From 60442c732268f499b8cedc049a5b6da024725770 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 21 Apr 2022 20:55:05 +0800 Subject: * TopDownTransform --- AlienSurvival/Assets/Scripts/Utils/GameLoop.cs | 27 +++++--------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'AlienSurvival/Assets/Scripts/Utils/GameLoop.cs') 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 -- cgit v1.1-26-g67d0