diff --git a/include/components/cCollision.h b/include/components/cCollision.h new file mode 100644 index 0000000000000000000000000000000000000000..2c996e149d7a078b9e0804ffe3cee827e2e61cf5 --- /dev/null +++ b/include/components/cCollision.h @@ -0,0 +1,18 @@ +#ifndef __COMPONENT__COLLISION_H__ +#define __COMPONENT__COLLISION_H__ + +#include "components/components-generic.h" +#include "maths/maths.h" + +class cCollision : public CComponentGeneric +{ + public: + double radius = 0.0; + + cCollision(){} + cCollision( float rad ) + : radius( rad ) {} +}; + + +#endif // __COMPONENT__COLLISION_H__ \ No newline at end of file diff --git a/include/components/cInput.h b/include/components/cInput.h new file mode 100644 index 0000000000000000000000000000000000000000..32dd16e742c35e4a5a52d6aa8c02862da5edc6b5 --- /dev/null +++ b/include/components/cInput.h @@ -0,0 +1,18 @@ +#ifndef __COMPONENT__INPUT_H__ +#define __COMPONENT__INPUT_H__ + +#include "components/components-generic.h" +#include "maths/maths.h" + +class cInput : public CComponentGeneric +{ + public: + bool up = false; + bool down = false; + bool left = false; + bool right = false; + bool shoot = false; +}; + + +#endif // __COMPONENT__INPUT_H__ diff --git a/include/components/cPointBar.h b/include/components/cPointBar.h new file mode 100644 index 0000000000000000000000000000000000000000..12becff77216b6976d3e41e73ecab70e1f444ee0 --- /dev/null +++ b/include/components/cPointBar.h @@ -0,0 +1,18 @@ +#ifndef __COMPONENT__POINT_BAR_H__ +#define __COMPONENT__POINT_BAR_H__ + +#include "components/components-generic.h" +#include "maths/maths.h" + +class cPointBar : public CComponentGeneric +{ + public: + cPointBar( uint16_t value ) + : _total(value), _current(value) {} + private: + uint16_t _total; + uint16_t _current; +}; + + +#endif // __COMPONENT__POINT_BAR_H__ diff --git a/include/components/cShape.h b/include/components/cShape.h new file mode 100644 index 0000000000000000000000000000000000000000..ef99062467b41098bfe4e121101b4b3b22dcd839 --- /dev/null +++ b/include/components/cShape.h @@ -0,0 +1,17 @@ +#ifndef __COMPONENT__SHAPE_H__ +#define __COMPONENT__SHAPE_H__ + +#include "components/components-generic.h" +#include "maths/maths.h" + +class cShape : public CComponentGeneric +{ + public: + cShape( uint8_t verticies ) + : _verticies( verticies ) {} + private: + uint8_t _verticies; +}; + + +#endif // __COMPONENT__SHAPE_H__ diff --git a/include/components/cTransform.h b/include/components/cTransform.h index 64e773d73a355a57562e487157c2bf43a64666a2..13a269d8aeca753e30e5fb06b8e0af6b1bf4293e 100644 --- a/include/components/cTransform.h +++ b/include/components/cTransform.h @@ -7,10 +7,14 @@ class cTransform : public CComponentGeneric { public: - Vec2 position; - Vec2 velocity; - Vec2 scale; - double angle; + Vec2 position = { 0.0, 0.0 }; + Vec2 velocity = { 0.0, 0.0 }; + Vec2 scale = { 0.0, 0.0 }; + double angle = 0.0; + + cTransform(){} + cTransform( const Vec2 &pos, const Vec2 &vel, float ang ) + : position(pos), velocity(vel), angle(ang) {} };