projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
'nother music patch by matzeb
[supertux.git]
/
src
/
physic.cpp
diff --git
a/src/physic.cpp
b/src/physic.cpp
index
476565f
..
aecc01e
100644
(file)
--- a/
src/physic.cpp
+++ b/
src/physic.cpp
@@
-44,10
+44,22
@@
Physic::reset()
}
void
}
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)
{
Physic::set_velocity(float nvx, float nvy)
{
-
vx = nvx;
-
vy = -nvy;
+ vx = nvx;
+ vy = -nvy;
}
void Physic::inverse_velocity_x()
}
void Physic::inverse_velocity_x()
@@
-73,6
+85,18
@@
Physic::get_velocity_y()
}
void
}
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;
Physic::set_acceleration(float nax, float nay)
{
ax = nax;