-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.hpp
37 lines (34 loc) · 864 Bytes
/
Game.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# pragma once
# include "Common.hpp"
# include "RocketEffect.hpp"
struct Machine;
struct Road;
class Game : public App::Scene
{
public:
Game(const InitData& init);
~Game();
void update() override;
void draw() const override;
private:
const Circle BuildSwitch{ 80, 80, 40 };
const RoundRect SaveButton{ 855, 2, 80, 28, 4 };
const RoundRect LoadButton{ 945, 2, 80, 28, 4 };
Camera2D camera;
Optional<Size> Selecting;
bool showElRange;
std::shared_ptr<Machine>targetMachine;
std::shared_ptr<Road>targetRoad;
Array<Point>roadBuildPlan;
Array<std::shared_ptr<Road>>sorted_roads;
AsyncTask<void>updateCells;
RectF CameraRegion;
RectF GameRegion;
Vec2 CursorBase;
Array<RocketEffect>Rockets;
std::shared_ptr<Array<Polygon>>RocketPolygon;
double autoSaveInterval;
Transition GetStarted;
bool BuildModal;
std::atomic<bool> updateCellAbort;
};