コード例 #1
0
        public void Update(float delta)
        {
            game.questionsManager.Update(delta);

            if (game.CurrentScoreRecord >= ToboganGame.MAX_ANSWERS_RECORD)
            {
                // Maximum tower height reached
                game.SetCurrentState(game.ResultState);
                return;
            }

            game.Context.GetOverlayWidget().SetClockTime(gameTime.Time);

            gameTime.Update(delta);

            if (requestNextQueston)
            {
                nextQuestionTimer -= delta;

                if (nextQuestionTimer <= 0f)
                {
                    game.questionsManager.StartNewQuestion();
                    requestNextQueston = false;
                }
            }
        }
コード例 #2
0
        public void Update(float delta)
        {
            if (nextState)
            {
                if (game.showTutorial)
                {
                    game.SetCurrentState(game.TutorialState);
                }
                else
                {
                    game.SetCurrentState(game.PlayState);
                }
                return;
            }

            if (playIntro)
            {
                playIntro = false;

                if (ToboganConfiguration.Instance.Variation == ToboganVariation.LetterInWord)
                {
                    game.Context.GetAudioManager().PlayDialogue(Database.LocalizationDataId.Tobogan_letters_Intro, delegate()
                    {
                        nextState = true;
                    });
                }
                else
                {
                    game.Context.GetAudioManager().PlayDialogue(Database.LocalizationDataId.Tobogan_letters_Intro, delegate()
                    {
                        nextState = true;
                    });
                }
            }
        }
コード例 #3
0
 public void Update(float delta)
 {
     if (nextState)
     {
         if (game.showTutorial)
         {
             game.SetCurrentState(game.TutorialState);
         }
         else
         {
             game.SetCurrentState(game.PlayState);
         }
     }
 }
コード例 #4
0
        public void Update(float delta)
        {
            if (!tutorialStarted)
            {
                delayStartTutorial += -delta;

                if (delayStartTutorial <= 0f)
                {
                    tutorialStarted = true;
                    TutorialDrawLine();
                }
            }

            if (toPlayState)
            {
                toPlayStateTimer -= delta;

                if (toPlayStateTimer <= 0f)
                {
                    toPlayState = false;
                    game.SetCurrentState(game.PlayState);
                }
            }

            if (pointerUp && tutorialStarted)
            {
                tutorialStarted    = false;
                delayStartTutorial = 3f;
            }

            if (requestNextQueston)
            {
                nextQuestionTimer -= delta;

                if (nextQuestionTimer <= 0f)
                {
                    game.questionsManager.StartNewQuestion();
                    requestNextQueston = false;
                }
            }
        }