aboutsummaryrefslogtreecommitdiff
path: root/sons_of_sol/Projectile.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'sons_of_sol/Projectile.hpp')
-rw-r--r--sons_of_sol/Projectile.hpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/sons_of_sol/Projectile.hpp b/sons_of_sol/Projectile.hpp
index 0949314..5f298a7 100644
--- a/sons_of_sol/Projectile.hpp
+++ b/sons_of_sol/Projectile.hpp
@@ -7,39 +7,40 @@
* Projectile.hpp: <description>
*/
+#include "glox/GloxCommon.hpp"
#include "glox/GloxPoint.hpp"
-#include "glox/objects/GloxCube.hpp"
#include "glox/GloxState.hpp"
-#include "glox/GloxCommon.hpp"
+#include "glox/objects/GloxCube.hpp"
#include <iostream>
#define TTL 50
class Projectile {
-public:
- Projectile( const glox::GloxPoint<>& position, const glox::GloxPoint<>& vector ) ;
-
- inline void update() {
- if( m_ttl == 0 || -- m_ttl == 0 ) {
- return ;
- }
- m_position += m_dpos;
+ public:
+ Projectile(const glox::GloxPoint<>& position,
+ const glox::GloxPoint<>& vector);
+
+ inline void update() {
+ if (m_ttl == 0 || --m_ttl == 0) {
+ return;
}
+ m_position += m_dpos;
+ }
- inline bool isDead() { return m_ttl == 0; }
+ inline bool isDead() { return m_ttl == 0; }
- void draw() ;
+ void draw();
- static void loadModel() ;
-private:
- uint8_t m_ttl ;
- float m_roty;
- float m_rotz;
- glox::GloxPoint<> m_position;
- glox::GloxPoint<> m_dpos;
- static glox::GloxCube* m_model ;
+ static void loadModel();
+ private:
+ uint8_t m_ttl;
+ float m_roty;
+ float m_rotz;
+ glox::GloxPoint<> m_position;
+ glox::GloxPoint<> m_dpos;
+ static glox::GloxCube* m_model;
};
#endif /* PROJECTILE_HPP_ */