Пример #1
0
        private void updateState(animation_state a)
        {
            state      = a;
            this_count = 0;

            switch (a)
            {
            case animation_state.DELAY:
                blockColor = cycleColors[0];
                break;

            case animation_state.BACKGROUND:
                SoundManager.Instance.Reset();
                music_id = SoundManager.Instance.RegisterSoundEffectInst(SoundLoader.Instance.GetSound(SoundLoader.Sounds.Game_Over));
                SoundManager.Instance.GetSoundEffectInstance(music_id).IsLooped = false;
                SoundManager.Instance.GetSoundEffectInstance(music_id).Play();
                game.playerCharacter.DeathSpin(false);
                break;

            case animation_state.BACKGROUND_ANIMATE:

                break;

            case animation_state.EXPLODE:
                game.playerCharacter.DeathSpin(true);
                explode = new CloudItem(game.playerCharacter.Position);
                //explode = new SmokeItemSprite(game.playerCharacter.Position);
                break;
            }
        }
Пример #2
0
        public LoseWrapper(IRoom room, IDungeon dung, Game1 _game) : base(room)
        {
            game    = _game;
            state   = animation_state.DELAY;
            dungeon = dung;

            cycleColors = new Color[] {
                new Color(0, 200, 0, 255),
                new Color(0, 130, 0, 255),
                new Color(0, 60, 0, 255),
                new Color(0, 0, 0, 255)
            };

            updateState(animation_state.DELAY);

            CollisionDetector.Instance.Pause();
        }
Пример #3
0
        private void updateState(animation_state a)
        {
            state      = a;
            this_count = 0;

            switch (a)
            {
            case animation_state.FLASH:
                SoundManager.Instance.Reset();
                music_id = SoundManager.Instance.RegisterSoundEffectInst(SoundLoader.Instance.GetSound(SoundLoader.Sounds.Triforce_Piece_Obtained));
                SoundManager.Instance.GetSoundEffectInstance(music_id).IsLooped = false;
                SoundManager.Instance.GetSoundEffectInstance(music_id).Play();
                break;

            case animation_state.BACKGROUND_ANIMATE:
                delta_x_percent = 0;

                break;

            case animation_state.OPTIONS:
                break;
            }
        }
Пример #4
0
        private void updateState(animation_state a)
        {
            count = 0;

            switch (a)
            {
            case animation_state.GAMEOVER:
                break;

            case animation_state.OPTIONS:
                break;

            case animation_state.RETURN:
                game.SetState(game.RESET);
                return;

            case animation_state.CLOSEGAME:
                game.Exit();
                return;
            }

            state = a;
        }