public void ApplyGravityToMario(Mario myMario) { double currentVelocity = myMario.GetVerticalVelocity(); double newVelocity = currentVelocity; Rectangle marioReference = myMario.GetRectangle(); if (newVelocity <= 5) { newVelocity += .5; myMario.SetVerticalVelocity(newVelocity); } }
public Rectangle GetRectangle() { //Rectangle currentRectangle = new Rectangle((int)location.X, (int)location.Y, (int)dimensions.X, (int)dimensions.Y); return(decoratedMario.GetRectangle()); }