void Awake() { mainMenuLoop = new MainMenuLoop(this, tweenerLib); startGameLoop = new StartGameLoop(this, tweenerLib); preparationLoop = new PreparationLoop(this, tweenerLib); playerActionLoop = new PlayerActionLoop(this, tweenerLib); actionResolutionLoop = new ActionResolutionLoop(this, tweenerLib); scoringLoop = new ScoringLoop(this, tweenerLib); newRoundLoop = new NewRoundLoop(this, tweenerLib); DOTween.Init(true, true, LogBehaviour.Verbose); }
/// <summary> /// Creates a line of equal signs that is proportional to the map's size. /// </summary> /// <param name="map"></param> /// <returns></returns> //public static string DisplayTileDecoration(Map map, int x, int y) //{ // string decoration = ""; // TileColorFormatting(map, x, y); // Console.Write("==========="); // Console.ResetColor(); // //for (int i = 0; i <= map.MapX - 1; i++) // //{ // // decoration += "==========="; // //} // return decoration; //} //------====== LOOP HELPER METHODS ======------ /// <summary> /// Opens a new loop based on the current GameManager's GameState property. Usually called when no loops are open OR immediately after a loop is broken. /// </summary> public static void LoopRedirect(ApplicationController gameManager) { switch (gameManager.GameState) { case GameState.MainMenu: MainMenuLoop.MainMenu(gameManager); break; case GameState.InGame: InGameLoop.InGame(gameManager); break; default: //Send error? The GameManager should always have a GameState prop //set to something. And since it's a glorious Enum, there wouldn't be //any mix-ups. But for now, let's just set the default to MainMenu, too. MainMenuLoop.MainMenu(gameManager); break; } }