cgamestate.h

来自「symbian 的一个 二维飞行游戏 源码 及相关技术文章」· C头文件 代码 · 共 51 行

H
51
字号
// Copyright 2002 Kenneth Guy,
// 
// CGameState.h


#ifndef _CGAMESTATE_H_
#define _CGAMESTATE_H_

/** \file CGameState.h 
    defines class CGameState */


#include <e32base.h>
#include <e32std.h>

class CHighScores;

/** UI side information about the game.

    This contains the current game state and the high score table.

*/

class CGameState {
public:
  /** Game state */
  enum TState {
    ENoGame, ///< No level loaded, start from first level
    EPaused, ///< Level loaded, game thread paused
    ENextLevel ///< No level loaded, start from next level
  };

public:
  static CGameState* NewL(const TDesC& aFileName);
  TState State();
  void SetState(TState aState);
  ~CGameState();

  CHighScores& HighScores();

private:
  CGameState();
  void ConstructL(const TDesC& aFileName);

private:
  CHighScores* iHighScores; ///< High score table
  TState       iState; ///< Game state
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?