diff options
Diffstat (limited to 'AlienSurvival/Assets/Scripts/Utils/GameLoop.cs')
-rw-r--r-- | AlienSurvival/Assets/Scripts/Utils/GameLoop.cs | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs b/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs index e22ed77..6bbb140 100644 --- a/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs +++ b/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs @@ -4,35 +4,18 @@ using UnityEngine; public class GameLoop : MonoBehaviour { + static public GameLoop Instance { get; private set; } - static GameLoop m_GameLoop; - - static public GameLoop instance - { - get - { - return m_GameLoop; - } - } - - int m_IndexOfUpdate = 0; - - public int indexOfUpdate - { - get - { - return m_IndexOfUpdate; - } - } + public int indexOfUpdate { get; private set; } = 0; private void Awake() { - m_GameLoop = this; + Instance = this; } private void Update() { - ++m_IndexOfUpdate; + ++indexOfUpdate; } -} +}
\ No newline at end of file |