added badman shooting and reloading
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
#define LD_GAME_BANDIT_H_
|
||||
|
||||
typedef enum BANDIT_ACTION BANDIT_ACTION;
|
||||
enum BANDIT_ACTION {
|
||||
enum BANDIT_ACTION
|
||||
{
|
||||
BANDIT_WAITING,
|
||||
BANDIT_WALKING,
|
||||
BANDIT_RUNNING,
|
||||
BANDIT_SHOOTING,
|
||||
BANDIT_SHOOTOUT,
|
||||
};
|
||||
|
||||
typedef struct Bandit Bandit;
|
||||
@@ -50,12 +52,18 @@ struct Bandit {
|
||||
F32 shootDelay;
|
||||
// After each shot this is set to shootDelay;
|
||||
F32 shootCooldownTimer;
|
||||
// Countdown to shootout
|
||||
F32 shootoutTimer;
|
||||
// How long it takes them to reload.
|
||||
F32 reloadTime;
|
||||
// When gun is empty this is set to reloadTime.
|
||||
F32 reloadTimer;
|
||||
// Accuracy, their shots can vary between this angle either side (rads)
|
||||
F32 accuracyRange;
|
||||
// A the circle around the bandit where they will trigger the quicktime reaction scene
|
||||
F32 agroRadius;
|
||||
};
|
||||
|
||||
function V2f shootTowards(Bandit* bandit, V2f target, Random* r);
|
||||
|
||||
#endif // LD_GAME_BANDIT_H_
|
||||
|
||||
Reference in New Issue
Block a user