Exemple #1
0
        public void Update(float delta)
        {
            if (MinigamesUI.Timer.Duration == MinigamesUI.Timer.Elapsed)
            {
                MinigamesUI.Timer.Pause();
                game.OnTimesUp();
            }

            //game.gameTime.Update(delta);
            anturaTimer.Update(delta);
            //game.timerText.text = ((int)game.gameTime.Time).ToString();

            if (game.currentLetter.dragging)
            {
                anturaTimer.Reset();
                anturaTimer.Start();
            }



            //check if we placed the CurrentLetter:
            if (!game.currentLetter.dragging && game.currentLetter.collidedTubes.Count > 0)
            {
                game.SetCurrentState(game.ResetState);
            }
        }
        public void EnterState()
        {
            game.initUI();

            game.IncrementRound();

            if (game.currentRound > 6)
            {
                game.SetCurrentState(game.EndState);
            }
        }
Exemple #3
0
        private void playedIntroSFX()
        {
            if (!game.TutorialEnabled)
            {
                game.SetCurrentState(game.IntroductionState);
                return;
            }

            UnityEngine.Debug.Log("Played Intro");
            game.spawnLetteAtTube();
        }
Exemple #4
0
 public void Update(float delta)
 {
     if (!game.currentLetter.isMoving)
     {
         if (!win)
         {
             game.SetCurrentState(game.PlayState);
         }
         else
         {
             game.SetCurrentState(game.IntroductionState);
         }
     }
 }
Exemple #5
0
 public void Update(float delta)
 {
     if ((game.antura.transform.position - game.currentLetter.transform.position).sqrMagnitude < 100)
     {
         game.currentLetter.panicAndRun();
     }
     if (game.antura.GetComponent <TakeMeHomeAntura> ().returnedToIdle())
     {
         game.SetCurrentState(game.ResetState);
     }
 }
        public void Update(float delta)
        {
            //do not do anything while dragging:
            if (this.game.currentLetter.dragging || !this.game.currentLetter.isDraggable)
            {
                return;
            }

            if (!game.currentLetter.dragging && game.currentLetter.collidedTubes.Count > 0)
            {
                //check if we should do anything:
                game.SetCurrentState(game.TutorialResetState);
                return;
            }

            timer -= delta;
            if (timer < 0)
            {
                timer = 5;
                showTutorial();
            }
        }