?? player.h
字號:
/**
* File : Player.h
* Author : Kevin Lynx
* Date : 2007/7/30
*/
#ifndef _PLAYER_H_
#define _PLAYER_H_
#include "Sprite.h"
#include "Singleton.h"
/**
* Player class, implements our hero
*
*/
class Player : public Singleton<Player>, public Sprite, public SpriteStatus
{
public:
enum
{
INIT_LIFE = 5,
INIT_MAX_FIRE = 2,
B_4SIDES_FIRE_TIME = 30 // 30s
};
public:
/**
* Constructor
*
*/
Player();
/**
* Destructor
*
*/
~Player();
/**
* init , create meshes etc...
*
*/
bool init( ISceneManager *smgr, IAnimatedMesh *mesh, ITexture *texture );
void update( float dt );
void reset( bool timeOut = false );
/**
* kill
*
* kill the pacman, make its life -1
* @return when the life is 0, return true
*/
bool kill();
/**
* addScore
*
*/
void addScore( int score );
/**
* sendBonus
*
* the player got a bonus, BonusManager send that gift to the player
*/
void sendBonus( int type );
/// i want to make the aabb smller , so i overload it
aabbox3df getWorldAABB();
void setPosition( const vector3df &pos );
/// when the player is dead, it will return a wrong array position
void getArrayPos( int &ax, int &az );
public:
int mLife;
int mScore;
int mMaxFire;
bool m4SidesFire;
f32 m4SidesTime;
/// god mod
bool mbGOD;
};
#endif // end _PLAYER_H_
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -