📄 ctank.h
字号:
//----------------------------------------------------------------------------
// 文件名: CTank.h
//
// 描述:用于坦克对象定义
//
// 作者:朱波 创建日期:2007-03-19
//----------------------------------------------------------------------------
#ifndef CTANK_H
#define CTANK_H
#include "CommonInclude.h"
#include "CSlug.h"
class CTank
{
public:
int Create( int kind, int direct, POINT m_position,
LPDIRECTDRAWSURFACE7 surface[], const RECT * lpMapRegion,
vector<GEOMETRY> *lpGeometry);
int Move( void );
int TestMoving( void );
int Fire( CSlug **lppSlug, LPDIRECTDRAWSURFACE7 slug_surface[] );
int Draw( void );
int SetDirect( int direct );
int GetDirect( void );
int SetTankKind( int kind );
int GetTankKind( void );
RECT & GetBoundingBox( void );
POINT & GetPosition( void );
int SetPosition( POINT & pos );
~CTank();
CTank();
protected:
POINT m_position;
RECT m_boundingBox;
RECT *m_lpMapRegion;
vector<GEOMETRY> *m_lpGeometryVec;
POINT m_draw_start;
int m_draw_width;
int m_draw_hight;
LPDIRECTDRAWSURFACE7 *m_draw_lppSurface;
int m_curDirect;
int m_tankKind;
int m_mySlugID;
int m_myGeometryID;
int m_moveStep;
int m_cur_time;
int m_pre_time_fire;
int MakeBoundingBox( int direct, POINT pos, RECT & box );
BOOL CanPutThere( POINT pos, const RECT *lpMapRegion,
vector<GEOMETRY> * lpGeometryVec );
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -