?? game.h
字號:
/* main game loop
* Template CS game
* (C)2001 Mat Sutcliffe. See license.txt for license info (GPL)
*/
#ifndef __GAME_MAIN_H__
#define __GAME_MAIN_H__
#include <iutil/objreg.h>
#include <csutil/var.h>
#include "../sound.h"
struct gamedata_t {
/* DEVELOPER MODIFIABLE:
* Game state: this is passed to init() by your 'start game' menu item
* It is also useful to have all the data in one place for save and load */
};
struct inputcmd_t {
const char *str;// action name, like "Fire", "Jump" or "Walk"
int *var; // pointer to the variable to store the input state
bool toggle; // for boolean inputs see, csInputBinder::Bind()
};
class Game {
private:
Sound *sound;
gamedata_t data;
public:
bool playing;
static inputcmd_t inputcmds[];
void start(gamedata_t);
void preframe(csTicks);
void doframe(csTicks);
void postframe(csTicks);
void stop();
Game(Sound *, iObjectRegistry *);
const char* init();
~Game();
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -