?? gamecore.h
字號:
//---------------------------------------------------------------------------
//
// Name: GameCore
// Author: ejoyc
// Created: 2008-6-23 19:00:35
// Description: GameCore為游戲引擎
//
//---------------------------------------------------------------------------
#ifndef _GameCore_H_
#define _GameCore_H_
#include "PreGame.h"
#define Game_Move 0
#define Game_Fixup 1
#define Game_Award 2
#define Game_Start 3
#define Game_Lost 4
class GameCell
{
public:
GameCell();
~GameCell();
public:
void InitWall();//清空"Wall"
void NewBrick();//生成新磚塊
void UpdateWall();//更新ShowWall
void CleanupBrick();//消減磚塊
void ShapeBrick();//變形
void MoveToLeft();//向左運動
void MoveToDown();//向下運動
bool GameOverTest();//游戲終止檢測
int GetCurrentScore();//獲取當前成績
void PlayMusic(int music_type);//播放聲音
wxBitmap GetMsgBitmap();//獲取提示信息的圖像
wxBitmap GetCurrentWall();//獲取當前"墻"的圖像
public:
int Brick_X,Brick_Y;//當前磚塊的坐標
private:
int Brick_Type;//當前磚塊的形狀(0~4)
int TrueWall[20][10];//背景信息矩陣
int ShowWall[20][10];//Brick進行4X4到20X10的目標
int sum_score;//記錄成績
int Brick_Next_ID;//下一個磚塊的ID
int Brick_Next_Type;//下一個磚塊的形狀
int Brick_ID;//當前磚塊的ID(0~6)
wxSound *snd_lost;
wxSound *snd_start;
wxSound *snd_move;
wxSound *snd_award;
wxSound *snd_fixup;
};
#endif //_GameCore_H_
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -