mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-24 09:08:23 -05:00
7763f81ede
* Unified all line endings in project to align with .editorconfig; all end-of-line characters have been set to LF and new-lines placed at the end of every file if not present.
34 lines
605 B
C#
34 lines
605 B
C#
using UnityEngine;
|
|
|
|
namespace UnityAtoms
|
|
{
|
|
[CreateAssetMenu(menuName = "Unity Atoms/Molecules/Timer/Timer")]
|
|
public class Timer : ScriptableObject
|
|
{
|
|
public float TimeElapsed = 0f;
|
|
public bool Started = false;
|
|
|
|
public void Start()
|
|
{
|
|
Started = true;
|
|
}
|
|
|
|
public void Stop()
|
|
{
|
|
TimeElapsed = 0f;
|
|
Started = false;
|
|
}
|
|
|
|
public float GetElapsedTime()
|
|
{
|
|
return TimeElapsed;
|
|
}
|
|
|
|
public bool IsStarted()
|
|
{
|
|
return Started;
|
|
}
|
|
}
|
|
|
|
}
|