home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
bombarder.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-08-25
|
3KB
|
139 lines
//=============================================================
#ifndef _BOMBARDER_H_
#define _BOMBARDER_H_
//=============================================================
//nepriatelsky bombarder
//rychlos¥
#define Bombarder_Speed 9.0f
//kolizne a gulometove body
#define Bombarder_Left Get3D(-40.0f,0.0f,0.0f)
#define Bombarder_Right Get3D(40.0f,0.0f,0.0f)
#define Bombarder_Front Get3D(0.0f,0.0f,20.0f)
#define Bombarder_Back Get3D(0.0f,0.0f,-43.0f)
#define Bombarder_BulletLeft Get3D(0.0f, 15.0f,0.0f)
#define Bombarder_BulletRight Get3D(0.0f,-15.0f,0.0f)
//pozicia vrtule
#define Bombarder_VrtulaPointLeft Get3D(-24.5f,-3.06f,50.01f)
#define Bombarder_VrtulaPointRight Get3D( 24.5f,-3.06f,50.01f)
//pozicia exploznych bodov
#define Bombarder_ExploPoint1 Get3D(-27.0f,-2.0f,40.0f)
#define Bombarder_ExploPoint2 Get3D( 27.0f,-2.0f,40.0f)
//frekvencia strielania
#define Bombarder_BulletFreq 100.0f
//frekvencia bombardovania
#define Bombarder_BombFreq 300.0f
//hlasitost zvuku
#define Bombarder_SoundScale 300.0f
//kedy po zostreleni zmizne
#define Bombarder_DestroyTime 15000.0f
//Ai fyzicke zdatnosti lietadla
#define Bombarder_MaxSteerZ 0.25f //maximalny zatocenie vodorovne
#define Bombarder_FactorZ 0.04f
#define Bombarder_FactorY 0.03f
//ai
#define Bombarder_MaxTime 20.0f //dlzka cyklu
#define Bombarder_FireTime 11.0f //kedy zacne strielat
//--------------------------------------------------------------
// Name: BOMBARDER class
// Desc: nemecky bombarder
//--------------------------------------------------------------
class BOMBARDER
{
private:
//zisti koliziu zeme
bool GetGroundCollision();
//zvuk
SOUND Sound;
bool SoundPlay;
public:
//vlastnosti
int Life;
//ciel
VECTOR3D Target;
//ci mas strielat
int Mode;
//aktivacia
bool Active;
float ActiveTime;
//m≤dy
bool NormalMode;
bool CrazyMode;
bool DestroyedMode;
//AI
float AITime;
//vrtula
float VrtulaRotation;
VECTOR3D PVLeft;
VECTOR3D PVRight;
//pozicia a matica
VECTOR3D Pos;
VECTOR3D Rot;
float ActRotZ;
D3DXMATRIX Matrix;
//kolizne body
VECTOR3D PL,PR,PF,PB ;
//explozne body
VECTOR3D PE1, PE2;
//AI
VECTOR3D SpitFirePoint;
//strely
BULLETSYSTEM Bullet;
VECTOR3D BL,BR;
float BulletTime;
//bomby
BOMBSYSTEM Bomb;
float BombTime;
//zastav zvuk
void StopSound();
//inicializacia
void Initialize();
//system
void Reset();
//refresh & render
void Refresh();
//kolizia s lietadlom
bool CollisionDetail(VECTOR3D P1, VECTOR3D P2);
bool CollisionBox(VECTOR3D P1, VECTOR3D P2);
};
//=============================================================
#endif //_BOMBARDER_H_