コード例 #1
0
        public IntroductionGameState(MixedLettersGame game)
        {
            this.game = game;

            float difficulty = MixedLettersConfiguration.Instance.Difficulty;

            if (difficulty <= 0.25f)
            {
                timePerRound = 60f;
            }

            else if (difficulty <= 0.5f)
            {
                timePerRound = 45f;
            }

            else if (difficulty <= 0.75f)
            {
                timePerRound = 30f;
            }

            else
            {
                timePerRound = 15f;
            }
        }
コード例 #2
0
        public TutorialGameState(MixedLettersGame game)
        {
            this.game    = game;
            audioManager = game.Context.GetAudioManager();

            isSpelling = MixedLettersConfiguration.Instance.Variation == MixedLettersConfiguration.MixedLettersVariation.Spelling;
        }
コード例 #3
0
        protected override void OnInitialize(IGameContext context)
        {
            instance = this;

            IntroductionState = new IntroductionGameState(this);
            QuestionState     = new QuestionGameState(this);
            PlayState         = new PlayGameState(this);
            ResultState       = new ResultGameState(this);
            TutorialState     = new TutorialGameState(this);

            lettersInOrder       = new List <ILivingLetterData>();
            allLettersInAlphabet = new List <ILivingLetterData>();

            isSpelling = MixedLettersConfiguration.Instance.Variation == MixedLettersConfiguration.MixedLettersVariation.Spelling;

            if (!isSpelling)
            {
                allLettersInAlphabet = MixedLettersConfiguration.Instance.Questions.GetNextQuestion().GetCorrectAnswers().ToList();
            }

            Physics.IgnoreLayerCollision(0, 5);
            Physics.IgnoreLayerCollision(12, 11);
            Physics.IgnoreLayerCollision(10, 12);

            ResetScene();

            MixedLettersConfiguration.Instance.Context.GetAudioManager().PlayMusic(Music.Theme9);
        }
コード例 #4
0
 public PlayGameState(MixedLettersGame game)
 {
     this.game = game;
 }
コード例 #5
0
 public QuestionGameState(MixedLettersGame game)
 {
     this.game = game;
 }
コード例 #6
0
 public ResultGameState(MixedLettersGame game)
 {
     this.game   = game;
     popupWidget = MixedLettersConfiguration.Instance.Context.GetPopupWidget();
 }