private void Start() { if (!Controller) { Controller = this; } }
void Awake() { Instance = this; if (Car.scoreGOText == null) { Car.scoreGOText = GameObject.FindGameObjectWithTag("ScoreGO").GetComponent <Text>(); } gameObject.SetActive(false); }
/// <summary> /// Sets the GameOverUIManager to be in the game over state. /// </summary> public void GameOver(GameObject player) { GameObject gameOverCanvas = Instantiate(GameOverCanvas, player.transform.position, Quaternion.identity); GameOverCanvasController gameOverController = gameOverCanvas.GetComponent <GameOverCanvasController>(); if (gameOverController != null) { gameOverController.GameOver(); } }
private void Awake() { gameCanvasController = GameCanvas.GetComponent <GameCanvasController>(); gameOverCanvasController = GameOverCanvas.GetComponent <GameOverCanvasController>(); dictionary = new Dictionary <GameObject, List <GameMode.eMode> >() { { TitleCanvas, new List <GameMode.eMode>() { GameMode.eMode.Title } }, { GameCanvas, new List <GameMode.eMode>() { GameMode.eMode.Game, GameMode.eMode.Tutorial, GameMode.eMode.Pause } }, { GameOverCanvas, new List <GameMode.eMode>() { GameMode.eMode.GameOver, GameMode.eMode.Credits } }, }; }