From 5c0c6b4a77e95b9939c911e0dfc4dc39c624d6b3 Mon Sep 17 00:00:00 2001 From: Saibotk Date: Tue, 24 Apr 2018 02:43:14 +0200 Subject: [PATCH] Small change to State change --- Assets/Scripts/GameController.cs | 6 +++--- Assets/Scripts/Generation/DungeonGenerator.cs | 2 +- Assets/Scripts/NotificationManager.cs | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/GameController.cs b/Assets/Scripts/GameController.cs index 41f56c7..753b3fa 100644 --- a/Assets/Scripts/GameController.cs +++ b/Assets/Scripts/GameController.cs @@ -144,7 +144,7 @@ public class GameController : MonoBehaviour { { Entity.Entities.BUG, bug }, { Entity.Entities.COIN, coin } }; - + ChangeState(GameState.INIT); } // Update is called once per frame @@ -152,7 +152,7 @@ public class GameController : MonoBehaviour { if ( !engineInitDone ) { engineInitDone = true; Debug.Log("First Frame"); - ChangeState(GameState.INIT); + ChangeState(GameState.STARTING); } if (Input.GetAxis("Pause") > 0) { if (state == GameState.RUNNING && !pausedPressed) { @@ -177,7 +177,7 @@ public class GameController : MonoBehaviour { switch ( nstate ) { case GameState.INIT: Init(); - ChangeState(GameState.STARTING); + //ChangeState(GameState.STARTING); break; case GameState.STARTING: Starting(); diff --git a/Assets/Scripts/Generation/DungeonGenerator.cs b/Assets/Scripts/Generation/DungeonGenerator.cs index 80dc53e..c5fe8ce 100644 --- a/Assets/Scripts/Generation/DungeonGenerator.cs +++ b/Assets/Scripts/Generation/DungeonGenerator.cs @@ -444,7 +444,7 @@ public class DungeonGenerator { } } } - Debug.Log(r.GetCenter() + " " + r.spawnpoints.Count + " spawn points."); + //Debug.Log(r.GetCenter() + " " + r.spawnpoints.Count + " spawn points."); } public static void GenerateObjective(Room r) { diff --git a/Assets/Scripts/NotificationManager.cs b/Assets/Scripts/NotificationManager.cs index 75ca3bf..151ccae 100644 --- a/Assets/Scripts/NotificationManager.cs +++ b/Assets/Scripts/NotificationManager.cs @@ -29,10 +29,13 @@ public class NotificationManager : MonoBehaviour { } } + public NotificationManager() { + messages = new List(); + delay = 0; + } + // Use this for initialization void Start() { - delay = 0; - messages = new List(); text = GetComponent(); Hide(); }