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