public override void EnterState(BroEnum previousState) { level = Context.Position.Y; jumpUp = HammerBro.Rand.Next() % 2 == 0; if (Context.BoundingBox.Rectangle.Bottom >= 288) { jumpUp = true; } Context.Velocity += new Vector2(0, jumpUp? -7 : -3); }
public override void EnterState(BroEnum previousState) { Context.Velocity = new Vector2(Context.Velocity.X == 0? 0.25f : -Context.Velocity.X, 0); timer = 64; }