From 09789179cd77ce2f626fffbc94a90ec8784b76df Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 28 Oct 2007 09:19:35 +0000 Subject: game::Ship interface changes --- src/game/ship.h | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'src/game/ship.h') diff --git a/src/game/ship.h b/src/game/ship.h index 31266a4..ac38547 100644 --- a/src/game/ship.h +++ b/src/game/ship.h @@ -26,32 +26,31 @@ public: /// speed vector in units/second float speed; - /// turn left, increase yaw_offset - void turn_left(); - /// turn right, decrease yaw_offset - void turn_right(); - /// yaw, angle in the x/z plane - float yaw; + /// return the current yaw angle + inline float yaw() const { return yaw_current; } + /// set the target yaw angle + void set_yaw(float y); - /// increase thrust - void thrust_increase(); - /// decrease thrust - void thrust_decrease(); - /// forward thruster in % [0-1] - float thrust; + /// return the current thruster power + inline float thrust() const { return thrust_current; } + /// set thruster power + void set_thrust(float t); /* -- Ship SPECS --*/ /// acceleration float acceleration; /// maximum speed - float max_speed; - /// maximum yaw_offset - float max_yaw_offset; + float speed_max; /// yaw turn speed float yaw_speed; private: - float yaw_offset; + /// current yaw, angle in the x/z plane + float yaw_current; + /// target yaw angle + float yaw_target; + /// current thruster power in % [0-1] + float thrust_current; }; } // namespace game -- cgit v1.2.3