using System;
using UnityEngine;
namespace CinemaDirector
{
[ExecuteInEditMode]
public abstract class CinemaGlobalAction : TimelineAction, IComparable
{
///
/// Called when the running time of the cutscene hits the firetime of the action
///
public abstract void Trigger();
///
/// Called at each update when the action is to be played.
///
public virtual void UpdateTime(float time, float deltaTime) { }
///
/// Called when the running time of the cutscene exceeds the duration of the action
///
public abstract void End();
///
/// Called when the cutscene time is set/skipped manually.
///
public virtual void SetTime(float time, float deltaTime) { }
///
/// Pause any action as necessary
///
public virtual void Pause() { }
///
/// Resume from paused.
///
public virtual void Resume() { }
///
/// Reverse trigger. Called when scrubbing backwards.
///
public virtual void ReverseTrigger() { }
///
/// Reverse End. Called when scrubbing backwards.
///
public virtual void ReverseEnd() { }
public int CompareTo(object other)
{
CinemaGlobalAction otherAction = (CinemaGlobalAction)other;
return (int)(otherAction.Firetime - this.Firetime);
}
}
}