コード例 #1
0
ファイル: BowserIdle.cs プロジェクト: Maplespyder/GameProject
 public override void BecomeWalk(Facing orientation)
 {
     Context.Orientation       = orientation;
     Context.Velocity          = orientation == Facing.Left ? new Vector2(-BowserObject.BowserMovementSpeed, 0) : new Vector2(BowserObject.BowserMovementSpeed, 0);
     Context.ActionStateBowser = new BowserWalk(Context);
     Context.Sprite            = MovingEnemySpriteFactory.Create(EnemyType.BowserWalk);
 }
コード例 #2
0
 public override void BecomeAlive()
 {
     Context.PowerupState = new PiranhaReveal(Context);
     Context.IsDead       = false;
     Context.Sprite       = MovingEnemySpriteFactory.Create(EnemyType.Piranha);
     Context.BoundingBox  = null;
     Context.Gravity      = false;
 }
コード例 #3
0
 public BowserAlive(BowserObject context) : base(context)
 {
     if (Context.Orientation == Facing.Right)
     {
         Context.Velocity = new Vector2(1f, Context.Velocity.Y);
     }
     else if (Context.Orientation == Facing.Left)
     {
         Context.Velocity = new Vector2(-1f, Context.Velocity.Y);
     }
     Context.Sprite = MovingEnemySpriteFactory.Create(EnemyType.BowserIdle);
 }
コード例 #4
0
ファイル: KoopaAlive.cs プロジェクト: Maplespyder/GameProject
        public KoopaAlive(AbstractEnemy context) : base(context)
        {
            if (Context.Orientation == Facing.Right)
            {
                Context.Velocity = new Vector2(1f, Context.Velocity.Y);
            }
            else if (Context.Orientation == Facing.Left)
            {
                Context.Velocity = new Vector2(-1f, Context.Velocity.Y);
            }

            Context.Sprite = MovingEnemySpriteFactory.Create(EnemyType.GreenKoopa);
        }
コード例 #5
0
 public override void BreatheFire()
 {
     Context.ActionStateBowser = new BowserFireBreathing(Context);
     Context.Sprite            = MovingEnemySpriteFactory.Create(EnemyType.BowserFire);
     Context.BowserFireballPool.GetAndRelease(Context);
 }
コード例 #6
0
 public override void BecomeIdle()
 {
     Context.ActionStateBowser = new BowserIdle(Context);
     Context.Sprite            = MovingEnemySpriteFactory.Create(EnemyType.BowserIdle);
 }