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); } }
public void TriggerPowerupCollectedEvent(AbstractPowerup powerup, Mario mario) { PowerupCollectedEventArgs args = new PowerupCollectedEventArgs(powerup, mario); OnRaisePowerupCollectedEvent(args); }
public CoinStaticState(AbstractPowerup context) : base(context) { }
public FireFlowerStaticState(AbstractPowerup context) : base(context) { }
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; }
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); }