Пример #1
0
        public static void JumpStage()
        {
            if (!Globals.JumpStageKeyDown && Globals.JumpStageKeyDownPrevious)
            {
                if (Globals.GameType == Enum.GameType.Arcade)
                {
                    if (Globals.KeyPressDelay > 0)
                    {
                        Globals.KeyPressDelay = 0;
                        FunctionsGame.ChangeStage();
                    }
                    else
                    {
                        Globals.KeyPressDelay++;
                    }
                }
                else if (Globals.GameType == Enum.GameType.OreColleting)
                {
                    if (Globals.KeyPressDelay > 0)
                    {
                        Globals.KeyPressDelay = 0;

                        Globals.Collided = true;
                        Globals.Landed   = true;
                    }
                    else
                    {
                        Globals.KeyPressDelay++;
                    }
                }
            }
        }
Пример #2
0
        public static void ApplyPostStage()
        {
            SoundClass.Stop(Globals.SFXRocketInstance);
            SoundClass.Stop(Globals.SFXFloatInstance);

            if (Globals.EnterKeyPressed)
            {
                if (Globals.GameType == Enum.GameType.Arcade)
                {
                    if (Globals.Landed)
                    {
                        FunctionsGame.ChangeStage();
                    }
                    else if (Globals.Collided)
                    {
                        if (Globals.ShipsLeft > 0)
                        {
                            Globals.ShipsLeft--;
                            FunctionsStage.InitializeStage();
                        }
                        else
                        {
                            Globals.CurrentScene = new Scenes.SceneTitle();
                        }
                    }
                }
                else if (Globals.GameType == Enum.GameType.OreColleting)
                {
                    if (Globals.Landed)
                    {
                        if (!Globals.SelectedStage.SpriteRedOre.Visible && !Globals.SelectedStage.SpriteGreenOre.Visible && !Globals.SelectedStage.SpriteBlueOre.Visible)
                        {
                            Globals.OreCollected = true;
                            FunctionsGame.RecordFeatures(Enum.RecordType.OreCollected);
                            Globals.CurrentScene = new Scenes.SceneChooseStage();
                        }
                        else
                        {
                            FunctionsStage.InitializeStage();
                        }
                    }
                    else
                    {
                        FunctionsStage.InitializeStage();
                    }
                }
                else
                {
                    FunctionsStage.InitializeStage();
                }
            }
        }