2019-12-05 11:50:58 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "game.h"
|
|
|
|
|
2019-12-26 17:44:58 +01:00
|
|
|
#define KEEPER_ATTACK_DISTANCE 190
|
2019-12-09 19:08:05 +01:00
|
|
|
#define KEEPER_ALONE_ATTACK_TIME 5000 //in millis
|
|
|
|
#define KEEPER_COMRADE_ATTACK_TIME 3000//in millis
|
|
|
|
#define KEEPER_BASE_VEL 320
|
|
|
|
#define KEEPER_VEL_MULT 1.4
|
|
|
|
#define KEEPER_BALL_BACK_ANGLE 30
|
2019-12-26 17:44:58 +01:00
|
|
|
#define KEEPER_ANGLE_SX 265
|
|
|
|
#define KEEPER_ANGLE_DX 85
|
2019-12-09 19:08:05 +01:00
|
|
|
|
2019-12-26 17:44:58 +01:00
|
|
|
//POSITION
|
|
|
|
#define CENTERGOALPOST_VEL1 220
|
|
|
|
#define CENTERGOALPOST_VEL2 220
|
|
|
|
#define CENTERGOALPOST_VEL3 220
|
|
|
|
#define CENTERGOALPOST_CAM_MIN -40
|
|
|
|
#define CENTERGOALPOST_CAM_MAX 40
|
|
|
|
#define CENTERGOALPOST_US_MAX 60
|
|
|
|
#define CENTERGOALPOST_US_CRITIC 25
|
2019-12-09 19:08:05 +01:00
|
|
|
|
|
|
|
class Keeper : public Game{
|
2019-12-05 11:50:58 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
Keeper();
|
2019-12-26 17:44:58 +01:00
|
|
|
Keeper(LineSystem*, PositionSystem*);
|
|
|
|
|
2019-12-09 19:08:05 +01:00
|
|
|
private:
|
|
|
|
void realPlay() override;
|
2019-12-26 17:44:58 +01:00
|
|
|
void init() override;
|
2019-12-05 11:50:58 +01:00
|
|
|
void keeper();
|
2019-12-26 17:44:58 +01:00
|
|
|
void centerGoalPostCamera(bool);
|
2019-12-09 19:08:05 +01:00
|
|
|
|
|
|
|
int defSpeed, defDir;
|
|
|
|
|
|
|
|
float angle, angleX, angleY;
|
|
|
|
elapsedMillis t, toh, keeperAttackTimer;
|
|
|
|
bool keeper_tookTimer, keeper_backToGoalPost;
|
|
|
|
};
|