-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.hpp
77 lines (62 loc) · 1.7 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#pragma once
#include "DxLib.h"
#include <vector>
#include <string>
#include <fstream>
#include "ExternalHeaderFiles/strconv.h"
#include "ExternalHeaderFiles/json.hpp"
#include "input.hpp"
#include "pos.hpp"
#include "player.hpp"
#include "arrow.hpp"
#include "map.hpp"
// monsters
#include "monsters/ball.hpp"
#include "monsters/flower_plant.hpp"
#include "monsters/slime.hpp"
#include "monsters/golem.hpp"
#include "monsters/bat.hpp"
#include "monsters/tree.hpp"
#include "monsters/virus.hpp"
using json = nlohmann::json;
class Game {
private:
enum scene {
INTRO, STAGE, PAUSE, SKILL_SELECT, DIE // ポーズは未使用
};
json Config;
std::string FileToString(std::string FilePath);
bool Debug;
int Frame;
std::string ConfigFilePath;
input Input;
scene Scene = INTRO;
map Map;
player Player;
bool Death = false;
bool Next = false;
std::vector<arrow> Arrow;
int ClearCount = 0;
std::vector<monster *> Monster;
std::vector<ball> Ball;
std::vector<flower_plant> FlowerPlant;
std::vector<slime> Slime;
std::vector<golem> Golem;
std::vector<bat> Bat;
std::vector<tree> Tree;
std::vector<virus> Virus;
int Load(); // 一番最初
bool Update(); // マイフレーム return false:終了
void Unload(bool Error); // 最後 Error:エラーで終了したか
int StartGraph;
bool Intro();
int BeforeIntroFrame = 0;
bool Stage();
int FadeOutCount = 0;
bool Pause();
bool SkillSelect();
int EndGraph;
bool Die();
public:
Game(bool Debug = false, std::string ConfigFilePath = "config.json");
};