pacman.h

来自「VIGASOCO (VIdeo GAmes SOurce COde) Windo」· C头文件 代码 · 共 69 行

H
69
字号
// Pacman.h
//
//	Class that manages all pacman data and behaviour
//
/////////////////////////////////////////////////////////////////////////////

#ifndef _PACMAN_H_
#define _PACMAN_H_


#include "Character.h"

class CharacterSubstate;		// defined in CharacterSubstate.h

class Pacman : public Character
{
// fields
public:
	// position and orientation
	Orientation wantedOrientation;
	int demoTilePosX, demoTilePosY;
	int wantedMovOffsX, wantedMovOffsY;

	// flags
	bool superPillEffect;
	bool nearSides;

	// movement patterns
	UINT32 movNormalPattern;
	UINT32 movSuperPillPattern;

	int movementDelay;
	int pillsInLastMove;

	// dead state
	int deadAnimState;
	int deadAnimCnt;
	CharacterSubstate *deadSubstates[0x11];

// methods
protected:
	void moveNormal();

	void moveDemo();
	void moveDemoMiddle();
	void moveDemoNoMiddle();
	void moveInDemoState();

	void advanceAndAdjustPacman();
	void checkForEatedItems();
	void changeOrientation();

public:
	void run();
	void animateDead();

	void checkOrientationChanges();

	virtual void selectProperAnimation();
	virtual void draw();

	// initialization and cleanup
	Pacman();
	virtual ~Pacman();
	virtual void resetState();
	virtual void initState(bool special);
};

#endif	// _PACMAN_H_

⌨️ 快捷键说明

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