Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "Vector.hpp"
  4.  
  5.  
  6. class Entity {
  7.  
  8. /******* Private members ***********/
  9. private:
  10.     Vector3f mPosition;
  11.  
  12.  
  13. /******* Constructors ***********/
  14. public:
  15.     inline explicit Entity(float x, float y, float z)   :mPosition(x, y, z) {}
  16.    
  17.  
  18. /******* Public methods ***********/
  19. public:
  20.     void virtual tick() = 0;
  21.  
  22.  
  23. /******* Getters ***********/
  24. public:
  25.     inline const Vector3f& position() const { return mPosition; }
  26.  
  27.  
  28. /******* Setters ***********/
  29. protected:
  30.     inline void virtual increasePosition(float dx, float dy) { setPosition(mPosition.x() + dx, mPosition.y() + dy); }
  31.     inline void virtual setPosition     (float  x, float y ) { mPosition.setX(x); mPosition.setY(y); }
  32.  
  33. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement