Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpUnitMotion.h
Show All 17 Lines | |||||
#ifndef INCLUDED_ICMPUNITMOTION | #ifndef INCLUDED_ICMPUNITMOTION | ||||
#define INCLUDED_ICMPUNITMOTION | #define INCLUDED_ICMPUNITMOTION | ||||
#include "simulation2/system/Interface.h" | #include "simulation2/system/Interface.h" | ||||
#include "simulation2/components/ICmpPathfinder.h" // for pass_class_t | #include "simulation2/components/ICmpPathfinder.h" // for pass_class_t | ||||
#include "simulation2/components/ICmpPosition.h" // for entity_pos_t | #include "simulation2/components/ICmpPosition.h" // for entity_pos_t | ||||
class CFixedVector2D; | |||||
/** | /** | ||||
* Motion interface for entities with complex movement capabilities. | * Motion interface for entities with complex movement capabilities. | ||||
* (Simpler motion is handled by ICmpMotion instead.) | * (Simpler motion is handled by ICmpMotion instead.) | ||||
* | * | ||||
* It should eventually support different movement speeds, moving to areas | * It should eventually support different movement speeds, moving to areas | ||||
* instead of points, moving as part of a group, moving as part of a formation, | * instead of points, moving as part of a group, moving as part of a formation, | ||||
* etc. | * etc. | ||||
*/ | */ | ||||
Show All 32 Lines | public: | ||||
virtual void FaceTowardsPoint(entity_pos_t x, entity_pos_t z) = 0; | virtual void FaceTowardsPoint(entity_pos_t x, entity_pos_t z) = 0; | ||||
/** | /** | ||||
* Stop moving immediately. | * Stop moving immediately. | ||||
*/ | */ | ||||
virtual void StopMoving() = 0; | virtual void StopMoving() = 0; | ||||
/** | /** | ||||
* Returns the position of the last waypoint of our current path, or (-1, -1) if we have none. | |||||
*/ | |||||
virtual CFixedVector2D GetLastWaypoint() const = 0; | |||||
/** | |||||
* Get the distance travelled over the last turn. | * Get the distance travelled over the last turn. | ||||
*/ | */ | ||||
virtual fixed GetCurrentSpeed() const = 0; | virtual fixed GetCurrentSpeed() const = 0; | ||||
/** | /** | ||||
* @returns true if the unit has a destination. | * @returns true if the unit has a destination. | ||||
*/ | */ | ||||
virtual bool IsMoving() const = 0; | virtual bool IsMoving() const = 0; | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator