#include <gameobj.h>
Inheritance diagram for CMovingGameObj:

Public Member Functions | |
| CMovingGameObj (int aType) | |
| Constructor. | |
| virtual | ~CMovingGameObj () |
| Destructor. | |
| float | velocity () |
| Getter for the velocity. | |
Protected Member Functions | |
| void | move (float aTimeFactor) |
| Moves object according to its velocity and direction. | |
| void | chkCollision (const char **aTileMap, CBotInfo **aBots, bool aCollisionWithObstacles) |
| Checks collisions and calculates time factor for moving. | |
| TPosition | scanTileMap (const char **aSrcTileMap, float aAngle, CTileMap *aDstTileMap) |
| Raycaster to scan visible tiles. | |
| virtual void | handleCollision (int aType)=0 |
| Collision handling. | |
Protected Attributes | |
| float | mVelocity |
| Velocity of the moving game object. | |
Includes speed and collision detection.
|
|
Constructor.
|
|
||||||||||||||||
|
Checks collisions and calculates time factor for moving. Time factor is 1.0, if no collisions are detected. In a case of collision both objects are handled using handleCollision().
|
|
|
Moves object according to its velocity and direction.
|
|
||||||||||||||||
|
Raycaster to scan visible tiles. Can be used to check collisions with walls.
|
|
|
Velocity of the moving game object. Moving direction depends on the orientation of the object. |
1.3-rc3