Example #1
0
 public virtual void BounceFromBlock(Vector2 position)
 {
     FromBlock  = true;
     Anchor     = (int)position.Y;
     Position   = new Vector2(position.X + 2, position.Y - Texture.Height);
     Velocity   = new Vector2(0, -0.25f);
     Collidable = false;
     Stage.AddEntity(this);
 }
Example #2
0
 public override void BounceFromBlock(Vector2 position)
 {
     SoundFactory.Instance.Coin();
     FromBlock  = true;
     Anchor     = (int)position.Y;
     Position   = new Vector2(position.X + 2, position.Y - Texture.Height);
     Velocity   = new Vector2(0, -1.75f);
     Collidable = false;
     Stage.AddEntity(this);
 }
Example #3
0
        public override void ThrowFire()
        {
            SoundFactory.Instance.ShootFire();
            Rectangle source = Context.SourceRectangle;

            MarioSpriteFactory.GetFireThrow(ref source);
            Context.SourceRectangle = source;
            Stage.AddEntity(MarioSpriteFactory.Instance.MakeFireball(Context.Position, Context.SourceRectangle.X));
            Context.ShotFireBall = true;
        }
 public void Execute()
 {
     Stage.AddEntity(EnemyFactory.Instance.NewEnemy(Create, block));
 }