FiE-Game/Assets/Cinema Director/System/Runtime/TimelineItems/Base/TimelineAction.cs

41 lines
934 B
C#
Raw Normal View History

2023-07-26 21:47:00 +02:00
using UnityEngine;
namespace CinemaDirector
{
/// <summary>
/// An action that has some firetime and duration.
/// </summary>
public abstract class TimelineAction : TimelineItem
{
[SerializeField]
protected float duration = 0f;
/// <summary>
/// The duration of the action
/// </summary>
public float Duration
{
get { return duration; }
set { duration = value; }
}
/// <summary>
/// The end time of this action. (Firetime + Duration).
/// </summary>
public float EndTime
{
get
{
return firetime + duration;
}
}
/// <summary>
/// Set a default duration of 5 seconds for most actions.
/// </summary>
public override void SetDefaults()
{
duration = 5f;
}
}
}