Beispiel #1
0
 void GameOnStarted()
 {
     if (shootingCurState == ShootingGameState.GameStart)
     {
         currentTime -= Time.deltaTime;
         if (currentTime <= 0)
         {
             shootingCurState = ShootingGameState.Gameover;
         }
     }
 }
Beispiel #2
0
        void Awake()
        {
            if (singleton == null)
            {
                singleton = this;
            }
            else if (singleton != this)
            {
                Destroy(this.gameObject);
            }

            DontDestroyOnLoad(this.gameObject);
            shootingCurState = ShootingGameState.WaitForStart;
        }