unit.h.svn-base

来自「自己做的小游戏」· SVN-BASE 代码 · 共 120 行

SVN-BASE
120
字号
#pragma once

#include "game_object.h"


void InitUnits();
GameObject* GODBGetGO( unsigned int unique_id );
void UpdateUnits();
void CalcUnitsNewPos();












































//#include <math.h>
//#include <windows.h>
//#include <limits.h>
//#include "../gamedata/Script.h"
//#include "../gamedata/Structs.h"
//#include "game_object.h"
//#include "fsm.h"
//
//#define STAND		0
//#define RUN			1
//#define ATTACK		2
//
////#define ULONG_MAX	0xffffffff
//
//class Unit
//{
//public:
//	Unit(void);
//	~Unit(void);
//
//	Vertex getPos();
//	Vertex getNextPos();
//	float getRotY();
//	int getState(int* type);
//
//	void move(Vertex dest);
//	void stand(Vertex dest);
//	void rotate(float face_z);
//
//	void update(unsigned long curTime);
//
//	void updateState();
//	void updatePosition();
//	void updateTimer();
//	void updateFrame();
//
//
//	Script script;
//	int maxHealth;
//	int health;
//	int aggressivity;
//	int attackDist;
//	float moveSpeed;
//	float height;
//	float oneStepLen;
//
//	bool cmd[3];
//	Vertex newPos;
//	float newRotY;
//
//	int preState, state;
//
//	Vertex pos;
//	float rotY;
//
//	unsigned long curT;
//	unsigned long preT;
//	unsigned long begT;
//	unsigned long endT;
//
//	Animation ani[3];
//	int curF;
//
//	static unsigned int ID;
//};
//

⌨️ 快捷键说明

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