-
Notifications
You must be signed in to change notification settings - Fork 0
/
fire.h
58 lines (44 loc) · 853 Bytes
/
fire.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include"shape.h"
struct Property :shapes //烟花的属性
{
int max_x;
int max_y; //最高位置
int x;
int y; //当前位置
bool ready; //是否可以发射
bool reach; //是否到达最高位置
int r = 15; //爆炸半径
int k = 0; //绽放次数
};
struct Final_Pos :shapes
{
int x;
int y;
};
#ifndef FIRE_H
#define FIRE_H
const int NUM = 10;
class Fire :public shape
{
private:
int WIDTH ;
int HEIGHT ;
int num;
DWORD t1 , tt1, t2 , tt2;
DWORD t3 , tt3;
int flag;
Final_Pos pos[NUM];//= { 0 };
Property arr[NUM]; //默认有10个炮弹
public:
Fire(int,int);
~Fire();
void update(int);
void CreateFire(int n);//创建烟花属性
void PlayFire();//发射烟花
void Fire_Burst(); //烟花绽放
void draw(int);
bool JudgePlay(int n);//判断烟花发射
void Change(int n);//改变烟花状态
};
#endif