Botón para anular/activar la gravedad
This commit is contained in:
@@ -115,4 +115,10 @@ void Ball::modVel(float vx, float vy)
|
||||
this->vy = this->vy + vy;
|
||||
onFloor = false;
|
||||
stopped = false;
|
||||
}
|
||||
|
||||
// Cambia la gravedad
|
||||
void Ball::switchGravity()
|
||||
{
|
||||
g = g == 0.0f ? GRAVITY : 0.0f;
|
||||
}
|
||||
Reference in New Issue
Block a user