コード例 #1
0
        //-----------------------------------------------------------------------------
        // Overridden Methods
        //-----------------------------------------------------------------------------
        public override void OnBegin(MonsterState previousState)
        {
            timer = 0;

            monster.Physics.Velocity = Vector2F.Zero;
            monster.Graphics.PauseAnimation();
        }
コード例 #2
0
        //-----------------------------------------------------------------------------
        // Overridden Methods
        //-----------------------------------------------------------------------------

        public override void OnBegin(MonsterState previousState)
        {
            timer = 0;

            monster.Physics.Velocity = Vector2F.Zero;
            monster.Graphics.PauseAnimation();
        }
コード例 #3
0
        //-----------------------------------------------------------------------------
        // Overridden Methods
        //-----------------------------------------------------------------------------

        public override void OnBegin(MonsterState previousState)
        {
            monster.Graphics.AnimationPlayer.Speed = 2.0f;
            monster.Graphics.AnimationPlayer.Play();
            monster.Physics.Velocity = Vector2F.Zero;
            monster.IsPassable       = true;
        }
コード例 #4
0
 //-----------------------------------------------------------------------------
 // Overridden Methods
 //-----------------------------------------------------------------------------
 public override void OnBegin(MonsterState previousState)
 {
     monster.Graphics.AnimationPlayer.Speed = 2.0f;
     monster.Graphics.AnimationPlayer.Play();
     monster.Physics.Velocity = Vector2F.Zero;
     monster.IsPassable = true;
 }
コード例 #5
0
        //-----------------------------------------------------------------------------
        // Overridden Methods
        //-----------------------------------------------------------------------------
        public override void OnBegin(MonsterState previousState)
        {
            timer = 0;
            flameAnimationPlayer.Play(GameData.ANIM_EFFECT_BURN);

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

            // Apply damage (make monster invincible for burn duration).
            DamageInfo damageInfo = new DamageInfo(burnDamage);
            damageInfo.ApplyKnockBack		= false;
            damageInfo.Flicker				= false;
            damageInfo.InvincibleDuration	= burnDuration;
            monster.Hurt(damageInfo);
        }
コード例 #6
0
        //-----------------------------------------------------------------------------
        // Overridden Methods
        //-----------------------------------------------------------------------------

        public override void OnBegin(MonsterState previousState)
        {
            timer = 0;
            flameAnimationPlayer.Play(GameData.ANIM_EFFECT_BURN);

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

            // Apply damage (make monster invincible for burn duration).
            DamageInfo damageInfo = new DamageInfo(burnDamage);

            damageInfo.ApplyKnockBack     = false;
            damageInfo.Flicker            = false;
            damageInfo.InvincibleDuration = burnDuration;
            monster.Hurt(damageInfo);
        }
コード例 #7
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);
        }
コード例 #8
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);
        }
コード例 #9
0
ファイル: MonsterState.cs プロジェクト: radtek/ZeldaOracle
 public virtual void OnEnd(MonsterState newState)
 {
 }
コード例 #10
0
        //-----------------------------------------------------------------------------
        // Overridden Methods
        //-----------------------------------------------------------------------------

        public override void OnBegin(MonsterState previousState)
        {
        }
コード例 #11
0
 //-----------------------------------------------------------------------------
 // Begin/end
 //-----------------------------------------------------------------------------
 public void Begin(Monster monster, MonsterState previousState)
 {
     this.monster = monster;
     this.isActive = true;
     OnBegin(previousState);
 }
コード例 #12
0
 public override void OnEnd(MonsterState newState)
 {
 }
コード例 #13
0
 //-----------------------------------------------------------------------------
 // Overridden Methods
 //-----------------------------------------------------------------------------
 public override void OnBegin(MonsterState previousState)
 {
 }
コード例 #14
0
 public override void OnEnd(MonsterState newState)
 {
     monster.Graphics.ResumeAnimation();
     monster.IsPassable = false;
 }
コード例 #15
0
ファイル: MonsterState.cs プロジェクト: radtek/ZeldaOracle
 public void End(MonsterState newState)
 {
     this.isActive = false;
     OnEnd(newState);
 }
コード例 #16
0
ファイル: MonsterState.cs プロジェクト: radtek/ZeldaOracle
        //-----------------------------------------------------------------------------
        // Begin/end
        //-----------------------------------------------------------------------------

        public void Begin(Monster monster, MonsterState previousState)
        {
            this.monster  = monster;
            this.isActive = true;
            OnBegin(previousState);
        }
コード例 #17
0
 public override void OnEnd(MonsterState newState)
 {
     // Monster should be destroyed, no need to change back to normal...?
 }
コード例 #18
0
 public void End(MonsterState newState)
 {
     this.isActive = false;
     OnEnd(newState);
 }
コード例 #19
0
 public override void OnEnd(MonsterState newState)
 {
     monster.Graphics.ResumeAnimation();
 }
コード例 #20
0
 //-----------------------------------------------------------------------------
 // Virtual methods
 //-----------------------------------------------------------------------------
 public virtual void OnBegin(MonsterState previousState)
 {
 }
コード例 #21
0
 public override void OnEnd(MonsterState newState)
 {
     monster.Graphics.AnimationPlayer.Speed = 1.0f;
     monster.IsPassable = false;
 }
コード例 #22
0
 public virtual void OnEnd(MonsterState newState)
 {
 }
コード例 #23
0
 public override void OnEnd(MonsterState newState)
 {
     monster.Graphics.ResumeAnimation();
     monster.IsPassable = false;
 }
コード例 #24
0
ファイル: Monster.cs プロジェクト: trigger-death/ZeldaOracle
 //-----------------------------------------------------------------------------
 // Monster States
 //-----------------------------------------------------------------------------
 // Begin the given monster state.
 public void BeginState(MonsterState newState)
 {
     if (state != newState) {
         if (state != null) {
             state.End(newState);
         }
         previousState = state;
         state = newState;
         newState.Begin(this, previousState);
     }
 }
コード例 #25
0
 public override void OnEnd(MonsterState newState)
 {
 }
コード例 #26
0
ファイル: Monster.cs プロジェクト: trigger-death/ZeldaOracle
        //-----------------------------------------------------------------------------
        // Overridden Methods
        //-----------------------------------------------------------------------------
        public override void Initialize()
        {
            base.Initialize();

            color = (MonsterColor) Properties.GetInteger("color", (int) color);

            health = healthMax;
            Graphics.PlayAnimation(GameData.ANIM_MONSTER_OCTOROK);
            ChooseImageVariant();

            // Begin the default monster state.
            BeginNormalState();
            previousState = state;
        }
コード例 #27
0
 public override void OnEnd(MonsterState newState)
 {
     // Monster should be destroyed, no need to change back to normal...?
 }
コード例 #28
0
 public override void OnEnd(MonsterState newState)
 {
     monster.Graphics.AnimationPlayer.Speed = 1.0f;
     monster.IsPassable = false;
 }
コード例 #29
0
 public override void OnEnd(MonsterState newState)
 {
     monster.Graphics.ResumeAnimation();
 }
コード例 #30
0
ファイル: MonsterState.cs プロジェクト: radtek/ZeldaOracle
        //-----------------------------------------------------------------------------
        // Virtual methods
        //-----------------------------------------------------------------------------

        public virtual void OnBegin(MonsterState previousState)
        {
        }