mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-24 09:08:23 -05:00
25 lines
593 B
C#
25 lines
593 B
C#
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
namespace UnityAtoms
|
|
{
|
|
/// <summary>
|
|
/// Updates the Timer. Meant to be placed on a OnUpdateMonoHook.
|
|
/// </summary>
|
|
[CreateAssetMenu(menuName = "Unity Atoms/Molecules/Timer/Update Timer")]
|
|
public sealed class UpdateTimer : VoidAction
|
|
{
|
|
[FormerlySerializedAs("Timer")]
|
|
[SerializeField]
|
|
private Timer _timer = null;
|
|
|
|
public override void Do()
|
|
{
|
|
if (_timer.Started)
|
|
{
|
|
_timer.TimeElapsed += Time.deltaTime;
|
|
}
|
|
}
|
|
}
|
|
}
|