basetreedrawer.h
来自「这是整套横扫千军3D版游戏的源码」· C头文件 代码 · 共 35 行
H
35 行
#ifndef __BASE_TREE_DRAWER_H__
#define __BASE_TREE_DRAWER_H__
#include "float3.h"
#define TREE_SQUARE_SIZE 64
class CBaseTreeDrawer
{
public:
CBaseTreeDrawer(void);
virtual ~CBaseTreeDrawer(void);
void Draw(bool drawReflection);
virtual void Draw(float treeDistance,bool drawReflection)=0;
virtual void DrawGrass(){};
virtual void Update()=0;
virtual void ResetPos(const float3& pos)=0;
static CBaseTreeDrawer* GetTreeDrawer(void);
virtual void AddTree(int type, float3 pos, float size)=0;
virtual void DeleteTree(float3 pos)=0;
float baseTreeDistance;
bool drawTrees;
virtual int AddFallingTree(float3 pos, float3 dir, int type);
virtual void AddGrass(float3 pos){};
virtual void RemoveGrass(int x, int z){};
virtual void DrawShadowPass(void);
};
extern CBaseTreeDrawer* treeDrawer;
#endif // __BASE_TREE_DRAWER__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?