diff options
author | chai <chaifix@163.com> | 2022-04-21 20:55:05 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-04-21 20:55:05 +0800 |
commit | 60442c732268f499b8cedc049a5b6da024725770 (patch) | |
tree | 0f87cee4cf46bff6e6da8dcb9716c035dc34663d /AlienSurvival/Assets/Scripts/Utils/GameLoop.cs | |
parent | 56c17ba085849adec3be7a6d023d09ec41a94326 (diff) |
* TopDownTransform
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 |