📄 mousecontroller.h
字号:
// definition of class Controller
#ifndef BWINDOW_H
#define BWINDOW_H
#include "enemy.h"
#include "puff.h"
#include "bomb.h"
#include <vector>
enum GameLevel { Slow, Fast, Done };
enum GameStatus {GameWon, Playing, GameLost, SettingUp };
// length of edge of the pannel window
const float PW_LENGTH = 4.0f ;
// speed of game
const int GameSpeed = 100;
// types of enemys, this will match game levels (Slow + Fast = 2)
const int NumberOfEnemyTypes = 2;
const int CTR_NBR = 50 ;
/////////////////////////////////////////
//
//class for GameController
//
class GameController {
public:
GameController(const string &Title = "Battle Of Sky!",
const Position &WinPosition = Position(3.0, 3.0),
const float WindLength = 20.0,
const float WinHeight = 16.0);
~GameController();
SimpleWindow *GetGameWindow();
void Display() ;
void Reset();
void Play(const GameLevel Level);
int MouseClick(const Position &MousePosition);
int TimerTick();
bool IsTouch() ;
bool IsShot(const Bomb *b) ;
private:
void EnemyHit( Bomb *b);
void PuffHit() ;
GameLevel CurrentLevel() const;
Enemy *CurrentEnemy() const;
SimpleWindow *GameWindow;
GameLevel Level;
GameStatus Status;
vector<Enemy*> KindOfEnemy;
Puff *Terminator ;
int EnemyNumbers ;
vector<Bomb*> Bomber ;
vector<BitMap> Button ;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -