Exemplo n.º 1
0
        //-----------------------------------------------------------------------------
        // Overridden Methods
        //-----------------------------------------------------------------------------
        public override void OnBegin(MonsterState previousState)
        {
            monster.IsPassable = true;

            if (galeEffect != null) {
                monster.SetPositionByCenter(galeEffect.Position);
                galeEffect.DestroyAndTransform(monster);
                galeEffect = null;
            }

            timer			= 0;
            isRising		= false;
            galeZPosition	= monster.ZPosition;
            monsterPosition	= monster.Position;

            monster.Physics.Velocity = Vector2F.Zero;
            monster.Graphics.PauseAnimation();
            monster.DisablePhysics();

            galeAnimationPlayer.Play(GameData.ANIM_EFFECT_SEED_GALE);
        }
Exemplo n.º 2
0
 public bool EnterGale(EffectGale gale)
 {
     if (isGaleable && ((state is MonsterNormalState) || (state is MonsterStunState))) {
         BeginState(new MonsterGaleState(gale));
         return true;
     }
     return false;
 }
Exemplo n.º 3
0
 //-----------------------------------------------------------------------------
 // Constructor
 //-----------------------------------------------------------------------------
 public MonsterGaleState(EffectGale galeEffect)
 {
     this.galeEffect = galeEffect;
     galeAnimationPlayer = new AnimationPlayer();
 }
Exemplo n.º 4
0
        private Entity CreateEffect(SeedType seedType, bool satchelEffect, Vector2F effectPosition)
        {
            Entity effectEntity = null;

            // Create the seed's effect.
            if (seedType == SeedType.Ember) {
                effectEntity = new Fire();
                AudioSystem.PlaySound(GameData.SOUND_FIRE);
            }
            else if (seedType == SeedType.Scent) {
                if (satchelEffect) {
                    effectEntity = new ScentPod();
                    AudioSystem.PlaySound(GameData.SOUND_SCENT_SEED_POD);
                }
                else {
                    effectEntity = new Effect(GameData.ANIM_EFFECT_SEED_SCENT, DepthLayer.EffectSeed);
                    AudioSystem.PlaySound(GameData.SOUND_SCENT_SEED);
                }
            }
            else if (seedType == SeedType.Mystery) {
                effectEntity = new Effect(GameData.ANIM_EFFECT_SEED_MYSTERY, DepthLayer.EffectSeed);
                AudioSystem.PlaySound(GameData.SOUND_MYSTERY_SEED);
            }
            else if (seedType == SeedType.Pegasus) {
                effectEntity = new Effect(GameData.ANIM_EFFECT_SEED_PEGASUS, DepthLayer.EffectSeed);
                AudioSystem.PlaySound(GameData.SOUND_FIRE);
            }
            else if (seedType == SeedType.Gale) {
                effectEntity = new EffectGale(satchelEffect);
                AudioSystem.PlaySound(GameData.SOUND_GALE_SEED);
            }

            RoomControl.SpawnEntity(effectEntity, effectPosition);
            return effectEntity;
        }