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.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs b/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs
index 6bbb140..6ae7d87 100644
--- a/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs
+++ b/AlienSurvival/Assets/Scripts/Utils/GameLoop.cs
@@ -2,18 +2,17 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
-public class GameLoop : MonoBehaviour
+public class GameLoop : Singleton<GameLoop>
{
- static public GameLoop Instance { get; private set; }
- public int indexOfUpdate { get; private set; } = 0;
-
- private void Awake()
+ public GameLoop()
{
- Instance = this;
+ indexOfUpdate = 0;
}
- private void Update()
+ public int indexOfUpdate { get; private set; } = 0;
+
+ public void Update()
{
++indexOfUpdate;
}