-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
61 lines (56 loc) · 1.26 KB
/
main.cpp
File metadata and controls
61 lines (56 loc) · 1.26 KB
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
#include"Console.h"
#include"Map.h"
#include"Battle.h"
#include"Manager.h"
#include"SoundManager.h"
using namespace std;
int main() {
Init();
PrintTitleScreen();
PlayingBgm(Opening);
//system("pause");
_getch();
system("cls");
PlayingBgm(Lake);
Map map;
Player player;
map.SetMap();
map.map[0][15] = '0';
map.PrintMap(map.map, &player.pos);
Battle battle(&player, &map);
while (true)
{
if (player.IsPokemonFull()) {
map.map[0][15] = '5';
}
Gotoxy(0, 0);
if (player.isBattle == false) {
player.MovePlayer(map);
player.PrintPokemon();
if (GetAsyncKeyState(VK_SPACE) || GetAsyncKeyState(VK_RETURN)) {
if (map.map[player.pos.y][player.pos.x] == '4') {
player.AllPokemonHeal();
PlayingEffect(Recorvery);
Gotoxy(player.pos.x * 2, player.pos.y + 1);
cout << "포켓몬이 모두 건강해졌습니다.";
}
else if (map.map[player.pos.y][player.pos.x] == '5') {
// TODO : 기라티나 출현
// 1. 가라티나 포효
// 2. 기라티나 출현
Gotoxy(26, 14);
PlayingEffect(GiratinaCries);
cout << "크아아아!";
player.isGiratina = true;
player.isBattle = true;
Sleep(1000);
}
}
}
else {
// 배틀
//battle.PrintBattleScreen();
battle.Update();
}
}
}