Last change
on this file since 12373 was
12357,
checked in by peterf, 6 years ago
|
Improved formatting and added some comments to make the code more precise
|
File size:
952 bytes
|
Rev | Line | |
---|
[12304] | 1 | #ifndef _PacmanBrown_H__ |
---|
| 2 | #define _PacmanBrown_H__ |
---|
| 3 | |
---|
| 4 | #include "PacmanGhost.h" |
---|
| 5 | |
---|
| 6 | namespace orxonox { |
---|
| 7 | |
---|
| 8 | class _OrxonoxExport PacmanBrown : public PacmanGhost{ |
---|
| 9 | |
---|
| 10 | public : |
---|
| 11 | PacmanBrown(Context* context); |
---|
| 12 | |
---|
[12357] | 13 | virtual void tick(float dt) override; //!< Defines which actions the AutonomousDrone has to take in each tick. |
---|
[12304] | 14 | |
---|
| 15 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; |
---|
| 16 | |
---|
| 17 | void setNewTargetBrown(Vector3 goalToGo); |
---|
| 18 | |
---|
| 19 | void nextMove(Vector3 playerPos, Vector3 redPos); |
---|
| 20 | |
---|
| 21 | int graphDistance(Vector3 start, Vector3 goal); |
---|
| 22 | |
---|
| 23 | int absoluteDistance(Vector3 pos1, Vector3 pos2); |
---|
| 24 | |
---|
| 25 | void fleeMode(); |
---|
| 26 | |
---|
| 27 | |
---|
[12320] | 28 | Vector3 goAdjacentOfPlayer(Vector3 neighboorsOfPlayer[]); |
---|
[12304] | 29 | //they both do the same -_- |
---|
| 30 | Vector3 findPlayerNeighboorNearestToPacman(Vector3 neighboorArray); |
---|
| 31 | |
---|
[12320] | 32 | bool isFleeing; |
---|
[12304] | 33 | |
---|
[12322] | 34 | bool isAdjacentToPlayerLastPastPoint(Vector3 pacmanBrownPos, Vector3 arrayForNeighborPositions[]); |
---|
[12320] | 35 | |
---|
[12304] | 36 | }; |
---|
| 37 | |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.