diff options
author | Stijn Buys <ingar@osirion.org> | 2007-10-28 09:19:35 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2007-10-28 09:19:35 +0000 |
commit | 09789179cd77ce2f626fffbc94a90ec8784b76df (patch) | |
tree | ea265dc9b338fc9673d55f7db0623fe4b2aa5824 /src/game/ship.h | |
parent | 795ec263875665e530458c7d95a1fb0242d55f8f (diff) |
game::Ship interface changes
Diffstat (limited to 'src/game/ship.h')
-rw-r--r-- | src/game/ship.h | 31 |
1 files changed, 15 insertions, 16 deletions
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 |