-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGameStart.cpp
60 lines (38 loc) · 1.12 KB
/
GameStart.cpp
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
#include <vector>
#include <list>
#include <math.h>
#include "DxLib.h"
#include "player.h"
#include "game.h"
#include "key.h"
#include "GameStart.h"
GAME_START::GAME_START(GAME *gamemgr, COMMON_DATA *common) : BASE_GAMESC(gamemgr) {
this->common = common;
font = CreateFontToHandle("TypeOne Regular", 60, 7, DX_FONTTYPE_ANTIALIASING_EDGE_4X4);
}
void GAME_START::Initialize() {
GrHandle = LoadGraph("data/image/other/centerbar.png");
}
void GAME_START::Finalize() {
}
void GAME_START::Update() {
time++;
if (time > 200) {
ChangeGameScene(NowGame_scene);
}
}
void GAME_START::Draw() {
if (0 <= time && time < 80) {
SetDrawBlendMode(DX_BLENDMODE_ALPHA, 155);
DrawRectGraph(0, 0, 0, 0, 10 * time, 600, GrHandle, true);
}
else if (80 <= time) {
SetDrawBlendMode(DX_BLENDMODE_ALPHA, 155);
DrawRectGraph(0, 0, 0, 0, 800, 600, GrHandle, true);
}
SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0);
if(time > 60)
DrawFormatStringFToHandle(250, 220, GetColor(255, 100, 0), font, "STAGE %d", *game->GameStage);
if(time > 140)
DrawFormatStringFToHandle(80, 320, GetColor(0, 35, 255), font, "MISSION START!!");
}