Example #1
0
 public MushroomMovingState(AbstractPowerup mushroom) : base(mushroom)
 {
     Context.DrawOrder = 0.51f;
     if (Context.Releaser != null)
     {
         if (Context.Releaser.Position.X <= Context.Position.X)
         {
             Context.Velocity = new Vector2(-2, 0);
         }
         else
         {
             Context.Velocity = new Vector2(2, 0);
         }
     }
     else
     {
         Context.Velocity = new Vector2(-2, 0);
     }
 }
Example #2
0
        public void TriggerPowerupCollectedEvent(AbstractPowerup powerup, Mario mario)
        {
            PowerupCollectedEventArgs args = new PowerupCollectedEventArgs(powerup, mario);

            OnRaisePowerupCollectedEvent(args);
        }
 public CoinStaticState(AbstractPowerup context) : base(context)
 {
 }
Example #4
0
 public FireFlowerStaticState(AbstractPowerup context) : base(context)
 {
 }
Example #5
0
 public PowerupRevealState(AbstractPowerup context) : base(context)
 {
     initialPosition   = new Vector2(context.Position.X, context.Position.Y);
     context.Velocity  = new Vector2(revealSpeed.X, revealSpeed.Y);
     context.DrawOrder = 0.53f;
 }
Example #6
0
 protected PowerupState(AbstractPowerup context)
 {
     Context           = context;
     Context.DrawOrder = 1;
     Context.Velocity  = new Vector2(0, 0);
 }
 public StarmanMovingState(AbstractPowerup star) : base(star)
 {
     Context.Velocity = new Vector2(-2, 0);
 }