-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApple.cpp
executable file
·91 lines (84 loc) · 1.77 KB
/
Apple.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include "Apple.h"
//#include "Play.h"
//#include <cmath>
Apple::Apple(void)
{
//this->speed = SPEED;
//this->starttime = GetNowCount();
this->graphic_h = LoadGraph("picture/minirin.bmp");
//this->sound_h = LoadSoundMem("music/bomb.mp3");
//this->hit_area = HIT_AREA;
//this->color = GetColor(0, 255, 0);
//SetMouseDispFlag( TRUE );
//exist=true;
//once=false;
}
Apple::Apple(int x, int y)
{
//this->x = x;
//this->y = y;
//this->speed = SPEED;
//this->starttime = GetNowCount();
this->graphic_h = LoadGraph("picture/minirin.bmp");
//this->sound_h = LoadSoundMem("music/bomb.mp3");
//this->hit_area = HIT_AREA;
//this->color = GetColor(0, 255, 0);
//SetMouseDispFlag( TRUE );
//exist=true;
//once=false;
}
Apple::~Apple(void)
{
}
/*
void Apple::Init(int x, int y)
{
this->x = x;
this->y = y;
this->starttime = GetNowCount();
exist=true;
once=false;
}
void Apple::UpDate()
{
if(exist){
this->y+=speed;
if(GetNowCount() - starttime > 3000){
exist = false;
once = false;
//score.SetCombo(0);
Play* play = Play::getInstance();
play->setCombo(0);
}
}
}
void Apple::Draw()
{
if(exist == true){
DrawGraph(this->x-33, this->y-37, graphic_h, true);
//DrawCircle(this->x, this->y, 30, this->color, true);
}
//score.Draw();
}
*/
//void Apple::Hit()
//{
// if(!once){
// PlaySoundMem(sound_h, DX_PLAYTYPE_BACK, true);
// exist = false;
// once = true;
// //score.Hit();
// }
//}
//bool Apple::HitJudge()
//{
// MouseInput = GetMouseInput();
// if(( MouseInput & MOUSE_INPUT_LEFT ) == 1 ){
// GetMousePoint(&mousex, &mousey);
// if(sqrt(pow(((double)mousex-x), 2)+pow(((double)mousey-y), 2)) <= 30){
// return true;
// }else{
// return false;
// }
// }
//}