blob: c88cde4d3a58e8419bf22638cd5db560d1283891 (
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
|
#include "gameCommon.h"
#include "entity.h"
#include "bullets.h"
#ifndef ANTIFA_SHIP_H
#define ANTIFA_SHIP_H
#define ANTIFA_SHIP_MAX_SPEED 200.0
#define ANTIFA_BULLET_COOLDOWN 0.5
#define ANTIFA_DRAW_BULLET_FOR 0.05
#define ANTIFA_BULLET_DAMAGE 0.125
// Auto target shit.
#define ANTIFA_START_AUTO_TARGET_MAX 0.5 // How far off auto target can be entail it drops.
#define ANTIFA_TARGETING_SPEED 6.0
typedef struct AntifaShip {
Vector2 lastMouse;
float forwardSpeed;
bool shouldInitMousePosition;
double timeSinceLastBullet;
Bullet lastBulletShot;
Vector3 gunTarget;
bool doAutoTarget;
bool isOnTarget;
EntityId targetedEntityId;
EntityFingerprint targetedEntityFingerprint;
} AntifaShip;
void initAntifaShip(Entity * entity, Game * game);
void closeAntifaShip(Entity * entity);
void updateAntifaShip(Game * game, Entity * entity);
void drawAntifaShip(Game * game, Entity * entity);
#endif
|