public override void onCollide(BasicSprite collided, Rectangle data, GameTime time) { base.onCollide(collided, data, time); // only if on top if (data.Height >= 1.0f) { collided.updatePositionFromVelocity(Velocity.FromCoordinates(0.0f, collided.velocity.getY() + velocity.getY())); } }
public override void onCollide(BasicSprite collided, Rectangle data, GameTime time) { base.onCollide(collided, data, time); collided.updatePositionFromVelocity(velocity); }