-
Notifications
You must be signed in to change notification settings - Fork 3
/
bird.h
39 lines (38 loc) · 773 Bytes
/
bird.h
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
#ifndef BIRD_H
#define BIRD_H
#include"myobject.h"
#include<QQueue>
class Pipe;
class Bird : public MyObject
{
public:
Bird();
~Bird();
void keyPress();
void Drop();
volatile char state;
QList<QPointer<Pipe>> pipelist;
private:
QPixmap * ani=nullptr;
unsigned int interval=20;
int timer_key_delay=0;
int timer_drop_delay=0;
double rot_add=-1;
double land;
double g=0;
double v_min=15;
void frame();
void gameover();
void restart();
void logic(const char);
void fly();
QPointer<Pipe> SetPipe(const double y) const ;
void GameReady();
void OnGameRun();
bool IsColliGround() const ;
void OnFly();
void DelPipe();
void GameOver();
void StopPipe();
};
#endif // BIRD_H