📄 ctank.cpp
字号:
//////////////////////////////////////////////////////////////////////////////////////////////////
// # # //
// # * File Name: CTank.cpp # //
// # # //
// # * Function: the engine of the game # //
// # # //
// # * Instruction: Created by JIAN NAN FEI 2008 8 29 # //
// # # //
///////////////////////////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------------------------------//
// DEFINES REFERENCES HERE //
//----------------------------------------------------------------------------------------------//
//----------------------------------------------------------------------------------------------//
// HEADFILES REFERENCES HERE //
//----------------------------------------------------------------------------------------------//
#include "CTank.h"
//----------------------------------------------------------------------------------------------//
// GLOBAL MEMBER VARIAYS REFERENCES HERE //
//----------------------------------------------------------------------------------------------//
//----------------------------------------------------------------------------------------------//
// FUNCTION MEMBERS REFERENCES HERE //
//----------------------------------------------------------------------------------------------//
CTank::CTank()
{
TANKNODE tank;
tank.m_bState=0;
tank.m_nLifeCount=0;
tank.m_nLifeTimes=0;
tank.m_nPower=0;
tank.m_nType=0;
tank.m_rRect=CRect(0,0,0,0);
m_tTank=tank;
m_nBelong=0;
m_ptNowPos=CPoint(-100,-100);
m_nMoveDirection=0;
m_nShootDirection=0;
m_nTankState=0;
}
CTank::CTank(int Type,int power,int lifecount,int lifetimes,int belong,POINT point,
int movedirection,int shootdirection,int top,int bottom,int left,int right)
{
TANKNODE tank;
tank.m_bState=0;
tank.m_nLifeCount=lifecount;
tank.m_nLifeTimes=lifetimes;
tank.m_nPower=power;
tank.m_nType=Type;
tank.m_rRect.top =top;
tank.m_rRect.bottom=bottom;
tank.m_rRect.left=left;
tank.m_rRect.right=right;
m_tTank=tank;
m_nBelong=belong;
m_ptNowPos=point;
m_nMoveDirection=movedirection;
m_nShootDirection=shootdirection;
m_nTankState=0;
}
//----------------------------------------------------------------------------------------------//
// COMPLISHMENT OF THE FILE //
//----------------------------------------------------------------------------------------------//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -