コード例 #1
0
 private void Start()
 {
     if (!Controller)
     {
         Controller = this;
     }
 }
コード例 #2
0
 void Awake()
 {
     Instance = this;
     if (Car.scoreGOText == null)
     {
         Car.scoreGOText = GameObject.FindGameObjectWithTag("ScoreGO").GetComponent <Text>();
     }
     gameObject.SetActive(false);
 }
コード例 #3
0
ファイル: GameUIManager.cs プロジェクト: chang47/CubeFlyer
    /// <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();
        }
    }
コード例 #4
0
        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
                  } },
            };
        }