Exemplo n.º 1
0
 public void AddLife(int count)
 {
     if (MPlayer != null)
     {
         MPlayer.AddLifes(count);
     }
 }
Exemplo n.º 2
0
 private void TimePassed(double initTime, double realTime)
 {
     if (MPlayer?.Life < incIfLessThan)
     {
         MPlayer.AddLifes(1);
     }
     TimePassedEvent?.Invoke();
     gTimer.Restart();
 }
Exemplo n.º 3
0
 private void TimePassed()
 {
     if (MPlayer?.Life < incIfLessThan)
     {
         MPlayer.AddLifes(1);
     }
     TimePassedEvent?.Invoke();
     gTimer.Restart();
 }
Exemplo n.º 4
0
        private void Update()
        {
            if (gMode == GameMode.Edit)
            {
                return;
            }
            if (WController == null)
            {
                return;
            }

            if (WController.GameResult == GameResult.Loose && !resultShowed)
            {
                resultShowed = true;
                MPlayer.AddLifes(-1);
                MGui.ShowLoss();
                return;
            }

            if (WController.GameResult == GameResult.Win && !resultShowed)
            {
                resultShowed = true;
                MPlayer.PassLevel();
                MGui.ShowVictory();
                return;
            }

            WController.Update(Time.time);
            if (gState == GameState.Shooting)
            {
                Shooting();
            }
            else if (gState == GameState.DisableTouch)
            {
            }
        }