blob: d8aa0df2d57144f43367ab24da2dd6b17df77741 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#include "gameCommon.h"
#include "entity.h"
#ifndef MISSILE_H
#define MISSILE_H
#define MISSILE_LIVE_FOREVER -1.0
#define MISSILE_DEFAULT_SPEED 100.0
#define MISSILE_DEFAULT_TIME_TO_LIVE MISSILE_LIVE_FOREVER
#define MISSILE_DEFAULT_DAMAGE 2.5
#define MISSILE_DEFAULT_BOOM_BOOM_AT 5.0
// I WANT TO BUILD A FUCKING MISSILE IN REAL LIFE!!!
typedef struct Missile {
double timeToLive;
double birthDay;
float damage;
float boomBoomAt;
} Missile;
void initMissile(Entity * entity, Game * game);
void closeMissile(Entity * entity);
void updateMissile(Game * game, Entity * entity);
void drawMissile(Game * game, Entity * entity);
void launchMissileAtTarget(Entity * entity, Vector3 target, float speed);
void setMissileDirection(Entity * entity, Vector3 direction);
void setMissileDamage(Entity * entity, float damage);
void setMissileBoomBoomAt(Entity * entity, float boomBoomAt);
void startMissileCountDown(Entity * entity, double timeToLive);
// Ok boomer
void missileGoBoomBoom(Game * game, Entity * entity);
#endif
|