3 #include <Covellite/Covellite.hpp>
20 namespace { Simple2DGame_t Simple2DGame; }
76 inline float GetMin(
void)
const noexcept {
return Position - Size / 2.0f; }
77 inline float GetMax(
void)
const noexcept {
return Position + Size / 2.0f; }
82 bool IsIntersect(
const GameUnit &)
const;
83 void Update(
float,
float);
88 const Component_t::ComponentPtr_t m_pPosition;
91 GameUnit(
float,
float,
float,
float,
float);
97 ObjectId_t AddBackground(
void);
98 ObjectId_t AddClock(
void);
100 GameObject_t BuildRectangle(
const GameObject_t &,
float,
float,
const String_t &);
101 GameObject_t BuildRectangle(
const GameObject_t &,
float,
float,
float,
float,
103 GameObject_t BuildRectangle(
const Rect &,
const Rect &,
float,
float,
float,
104 float,
const String_t &,
const GameObject_t &);
105 GameObject_t BuildRectangle(
const Rect &,
const Rect &,
float,
float,
float,
float,
106 const GameObject_t &,
const GameObject_t &);
110 bool m_IsTouch =
false;
111 float m_MouseX = 0.0f;
112 float m_MouseY = 0.0f;
116 const float m_Height;
117 const float m_GameFieldSize;
120 ObjectId_t m_CameraId;
121 ObjectId_t m_BackGroundId;
122 ObjectId_t m_ClockId;
123 ObjectId_t m_EnemiesId;
124 ObjectId_t m_GreenSquareId;
125 ObjectId_t m_RedSquareId;
127 ::std::vector<GameUnit> m_Enemies;
128 float m_EnemiesSpeed = 0.1f;
129 float m_BeginGameTime;
134 Simple2DGame(WindowExpanse_t &,
const Rect &);
135 Simple2DGame(
const Simple2DGame &) =
delete;
136 Simple2DGame(Simple2DGame &&) =
delete;
137 const Simple2DGame & operator= (
const Simple2DGame &) =
delete;
138 Simple2DGame & operator= (Simple2DGame &&) =
delete;