45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using System;
|
|
using Sirenix.OdinInspector;
|
|
using SLSUtilities.Feedback;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Effects.Feedback
|
|
{
|
|
/// <summary>
|
|
/// 后处理震动Action的基类。
|
|
/// 封装了统一的曲线参数定义和生命周期管理。
|
|
/// 子类需要实现TriggerEvent和StopEvent抽象方法。
|
|
/// </summary>
|
|
[Serializable]
|
|
public abstract class PostprocessingActionBase : FeedbackActionBase
|
|
{
|
|
public override void OnStart(FeedbackContext context)
|
|
{
|
|
TriggerEvent(context);
|
|
}
|
|
|
|
public override void OnUpdate(FeedbackContext context, float normalizedTime)
|
|
{
|
|
}
|
|
|
|
public override void OnEnd(FeedbackContext context)
|
|
{
|
|
}
|
|
|
|
public override void OnInterrupt(FeedbackContext context)
|
|
{
|
|
StopEvent(context);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 触发震动事件(由子类实现)。
|
|
/// </summary>
|
|
protected abstract void TriggerEvent(FeedbackContext context);
|
|
|
|
/// <summary>
|
|
/// 停止震动事件(由子类实现)。
|
|
/// </summary>
|
|
protected abstract void StopEvent(FeedbackContext context);
|
|
}
|
|
}
|