X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fphysic.cpp;h=aecc01e51facc3f733594812ec247d214d5c04b3;hb=efb7eb0f84938633537f38fa1e76441181fad41e;hp=476565f9762037dceffbfddbf2c68261e3aecc72;hpb=84160722392a024dda42bd86ca9bd85b68c49457;p=supertux.git diff --git a/src/physic.cpp b/src/physic.cpp index 476565f97..aecc01e51 100644 --- a/src/physic.cpp +++ b/src/physic.cpp @@ -44,10 +44,22 @@ Physic::reset() } void +Physic::set_velocity_x(float nvx) +{ + vx = nvx; +} + +void +Physic::set_velocity_y(float nvy) +{ + vy = -nvy; +} + +void Physic::set_velocity(float nvx, float nvy) { - vx = nvx; - vy = -nvy; + vx = nvx; + vy = -nvy; } void Physic::inverse_velocity_x() @@ -73,6 +85,18 @@ Physic::get_velocity_y() } void +Physic::set_acceleration_x(float nax) +{ + ax = nax; +} + +void +Physic::set_acceleration_y(float nay) +{ + ay = -nay; +} + +void Physic::set_acceleration(float nax, float nay) { ax = nax;