summaryrefslogtreecommitdiff
path: root/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs
diff options
context:
space:
mode:
Diffstat (limited to 'AlienSurvival/Assets/Scripts/Utils/GameLoop.cs')
-rw-r--r--AlienSurvival/Assets/Scripts/Utils/GameLoop.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs b/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs
new file mode 100644
index 0000000..e22ed77
--- /dev/null
+++ b/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs
@@ -0,0 +1,38 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class GameLoop : MonoBehaviour
+{
+
+ static GameLoop m_GameLoop;
+
+ static public GameLoop instance
+ {
+ get
+ {
+ return m_GameLoop;
+ }
+ }
+
+ int m_IndexOfUpdate = 0;
+
+ public int indexOfUpdate
+ {
+ get
+ {
+ return m_IndexOfUpdate;
+ }
+ }
+
+ private void Awake()
+ {
+ m_GameLoop = this;
+ }
+
+ private void Update()
+ {
+ ++m_IndexOfUpdate;
+ }
+
+}