public void ApplyGravityToMario(Mario myMario) { double currentVelocity = myMario.GetVerticalVelocity(); double newVelocity = currentVelocity; Rectangle marioReference = myMario.GetRectangle(); if (newVelocity <= 5) { newVelocity += .5; myMario.SetVerticalVelocity(newVelocity); } }