Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/ship.h')
-rw-r--r--src/game/ship.h31
1 files changed, 5 insertions, 26 deletions
diff --git a/src/game/ship.h b/src/game/ship.h
index e919f38..d108223 100644
--- a/src/game/ship.h
+++ b/src/game/ship.h
@@ -13,43 +13,22 @@
namespace game {
-class Ship : public core::Entity
+class Ship : public core::EntityControlable
{
public:
Ship();
~Ship();
/// update the ship state
- void update(float elapsed);
-
- /// speed vector in units/second
- float speed;
-
- /// return the current yaw angle
- inline float yaw() const { return yaw_current; }
- /// set the target yaw angle
- void set_yaw(float y);
-
- /// return the current thruster power
- inline float thrust() const { return thrust_current; }
- /// set thruster power
- void set_thrust(float t);
+ void frame(float seconds);
/* -- Ship SPECS --*/
/// acceleration
float acceleration;
/// maximum speed
- float speed_max;
- /// yaw turn speed
- float yaw_speed;
-private:
- /// current yaw, angle in XZ plane, 0-360
- float yaw_current;
- /// target yaw angle, angle in XYplane, 0-360
- float yaw_target;
-
- /// current thruster power in % [0-1]
- float thrust_current;
+ float max_speed;
+ /// turn speed in rotations per second
+ float turn_speed;
};
} // namespace game