home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
truck.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-05-23
|
2KB
|
82 lines
//==============================================================
#ifndef _TRUCK_H_
#define _TRUCK_H_
//==============================================================
//frekvencia strielania
#define Truck_BulletFreq 150.0f
//hlasitost zvuku
#define Truck_SoundScale 60.0f
//kolko trva vybuch
#define Truck_CrazyTime 1470.0f
//kedy po zostreleni zmizne
#define Truck_DestroyTime 40000.0f
//minimalna vzdialenost na to aby zacal strielat
#define Truck_Distance 1800.0f
//kde je ulozene delo
#define Truck_CannonPos Get3D(0.0f,32.0f,0.0f)
//-------------------------------------------------------------
// Name: Truck class
// Desc: Pozemne protilietadlove delo
//-------------------------------------------------------------
class TRUCK
{
private:
public:
//vlastnosti
int Life;
//aktivacia
bool Active;
float ActiveTime;
//ci je hlavny ciel
bool Target;
//m≤dy
bool NormalMode;
bool CrazyMode;
bool DestroyedMode;
//AI mody
bool Utok; //utocny mod
bool Sledovanie; //neutocny mod
//pozicia a matica
VECTOR3D Pos;
VECTOR3D Rot;
D3DXMATRIX Matrix;
//strely - cannon
BULLETSYSTEM Bullet;
float BulletTime;
VECTOR3D CannonPosition;
VECTOR3D CannonRotation;
//inicializacia
void Initialize();
//system
void Reset();
//refresh & render
void Refresh();
//kolizia s truckom
bool CollisionDetail(VECTOR3D P1, VECTOR3D P2);
bool CollisionBox(VECTOR3D P1, VECTOR3D P2);
};
//==============================================================
#endif //_TRUCK_H_