Revision 1378,
1.1 KB
checked in by giegl, 18 years ago
(diff) |
GTPD - Jungle Rumble - integrate into GTP SVN structure
|
Rev | Line | |
---|
[1378] | 1 | #pragma once
|
---|
| 2 | #include "player.h"
|
---|
| 3 | #include <ctime>
|
---|
| 4 |
|
---|
| 5 | class Goodie;
|
---|
| 6 |
|
---|
| 7 | #define CHECK_ROTATING 0
|
---|
| 8 | #define LEAVE_ISLAND 1
|
---|
| 9 | #define DRIVE_AROUND 2
|
---|
| 10 | #define NEAR_GOODIE 3
|
---|
| 11 | #define NEAR_OPPONENT 4
|
---|
| 12 | #define NEAR_OBSTACLE 5
|
---|
| 13 |
|
---|
| 14 | #define COLL_ZONE 0
|
---|
| 15 | #define ATTACK_ZONE 1
|
---|
| 16 | #define FIRE_ZONE 2
|
---|
| 17 | #define DRIVE_ZONE 3
|
---|
| 18 |
|
---|
| 19 | #define COLL_DIST 10
|
---|
| 20 | #define ATTACK_DIST 75
|
---|
| 21 |
|
---|
| 22 | #define SPTR boost::shared_ptr
|
---|
| 23 |
|
---|
| 24 | class AIPlayer :
|
---|
| 25 | public Player
|
---|
| 26 | {
|
---|
| 27 | public:
|
---|
| 28 | AIPlayer(void);
|
---|
| 29 | ~AIPlayer(void);
|
---|
| 30 |
|
---|
| 31 | Player *activeOpponent;
|
---|
| 32 |
|
---|
| 33 | virtual void update(float dt);
|
---|
| 34 |
|
---|
| 35 | protected:
|
---|
| 36 |
|
---|
| 37 | float speedCounter;
|
---|
| 38 | float steeringCounter;
|
---|
| 39 | int speedMod;
|
---|
| 40 | int steeringMod;
|
---|
| 41 | bool needNewRand;
|
---|
| 42 | float linksrechts;
|
---|
| 43 | float timer;
|
---|
| 44 |
|
---|
| 45 | //StateMachine
|
---|
| 46 | int myState;
|
---|
| 47 | int myZone;
|
---|
| 48 |
|
---|
| 49 | bool isLeaving(Vector center, float ch);
|
---|
| 50 | bool isObstacleNear();
|
---|
| 51 | bool isNear();
|
---|
| 52 | bool isGoodieNear();
|
---|
| 53 |
|
---|
| 54 | void driveAround(float dt, Vector center, float ch);
|
---|
| 55 | void driveTo(float dt, Vector position, float speed);
|
---|
| 56 | void selectWeapon();
|
---|
| 57 | float drTimer;
|
---|
| 58 | float lastNewPositionTime;
|
---|
| 59 | Vector driveToPosition;
|
---|
| 60 |
|
---|
| 61 | Goodie *activeGoodie;
|
---|
| 62 |
|
---|
| 63 | float frTimer;
|
---|
| 64 | float lastFire;
|
---|
| 65 | Vector obstaclePos;
|
---|
| 66 | };
|
---|
Note: See
TracBrowser
for help on using the repository browser.