using System; using Sirenix.OdinInspector; using SLSUtilities.Feedback; using UnityEngine; namespace Cielonos.MainGame.Effects.Feedback { /// /// 摄像机视野角(FOV)反馈动作,通过 CameraFovShakeEvent 触发 CameraFovShaker。 /// [Serializable] [FeedbackActionColor(0.2f, 0.8f, 0.9f)] public class CameraFieldOfViewAction : CinemachineActionBase { public override string DisplayName => "Camera Field of View"; [TitleGroup("FOV设置")] [LabelText("FOV曲线")] public FloatCurveChannel fovCurve = FloatCurveChannel.CreateDefault(); protected override void TriggerEvent(FeedbackContext context) { CameraFovShakeEvent.Trigger(context, fovCurve); } protected override void StopEvent(FeedbackContext context) { CameraFovShakeEvent.Trigger(context, fovCurve, true); } public override bool Validate(out string error) { error = null; return true; } } }