Ejemplo n.º 1
0
        public void Tick(StageSelectInput input)
        {
            if (numUnlockedStages > 0 && !gotoGame && currentState != State.Exit)
            {
                if (input.Left && !input.Right)
                {
                    currentStageIndex--;
                    if (currentStageIndex < 0)
                    {
                        currentStageIndex += numUnlockedStages;
                    }
                }
                else if (input.Right && !input.Left)
                {
                    currentStageIndex = (currentStageIndex + 1) % numUnlockedStages;
                }
            }

            if (input.Start)
            {
                gotoGame = true;
            }

            if (input.Exit && !gotoGame)
            {
                currentState = State.Exit;
            }

            if (gotoGame)
            {
                if (gotoGameCount < 16)
                {
                    if (gotoGameCount == 0)
                    {
                        audio.StopMusic();
                    }
                    gotoGameCount++;
                }
                else
                {
                    currentState = State.GotoGame;
                }
            }
        }
Ejemplo n.º 2
0
        public void Tick(StageSelectInput input)
        {
            if (numUnlockedStages > 0 && !gotoGame && currentState != State.Exit)
            {
                if (input.Left && !input.Right)
                {
                    currentStageIndex--;
                    if (currentStageIndex < 0)
                    {
                        currentStageIndex += numUnlockedStages;
                    }
                }
                else if (input.Right && !input.Left)
                {
                    currentStageIndex = (currentStageIndex + 1) % numUnlockedStages;
                }
            }

            if (input.Start)
            {
                gotoGame = true;
            }

            if (input.Exit && !gotoGame)
            {
                currentState = State.Exit;
            }

            if (gotoGame)
            {
                if (gotoGameCount < 16)
                {
                    if (gotoGameCount == 0)
                    {
                        audio.StopMusic();
                    }
                    gotoGameCount++;
                }
                else
                {
                    currentState = State.GotoGame;
                }
            }
        }