|
| NPC (const vec3< F32 > ¤tPosition, std::string_view name) |
| NPCs don't need AI by default.
|
|
| ~NPC () override=default |
|
void | update (U64 deltaTimeUS) override |
|
AI::AIEntity * | getAIEntity () const noexcept |
|
| Character (CharacterType type) |
|
virtual void | update (U64 deltaTimeUS) |
|
virtual void | setPosition (const vec3< F32 > &newPosition) |
| Set the current position of this charater.
|
|
virtual void | setVelocity (const vec3< F32 > &newVelocity) |
| Update character velocity.
|
|
virtual vec3< F32 > | getPosition () const |
| The current position of this character.
|
|
virtual vec3< F32 > | getLookingDirection () |
| The direction in which the character is currently looking.
|
|
virtual void | lookAt (const vec3< F32 > &targetPos) |
| Rotate the character to look at another character.
|
|
const vec3< F32 > & | getRelativeLookingDirection () const noexcept |
|
void | setRelativeLookingDirection (const vec3< F32 > &direction) noexcept |
|
void | playAnimation (U32 index) const |
|
void | playNextAnimation () const |
|
void | playPreviousAnimation () const |
|
void | pauseAnimation (bool state) const |
|
| PROPERTY_RW (CharacterType, characterType, CharacterType::COUNT) |
|
| Unit (UnitType type) |
|
virtual bool | moveTo (const vec3< F32 > &targetPosition, const U64 deltaTimeUS) |
|
virtual bool | moveToX (F32 targetPosition, const U64 deltaTimeUS) |
| Move along the X axis.
|
|
virtual bool | moveToY (F32 targetPosition, const U64 deltaTimeUS) |
| Move along the Y axis.
|
|
virtual bool | moveToZ (F32 targetPosition, const U64 deltaTimeUS) |
| Move along the Z axis.
|
|
virtual bool | teleportTo (const vec3< F32 > &targetPosition) |
| teleportTo instantly places the unit at the desired position
|
|
const vec3< F32 > & | getCurrentPosition () const |
|
const vec3< F32 > & | getTargetPosition () const |
| Get the unit's target coordinates in the world.
|
|
virtual void | setMovementSpeed (const F32 movementSpeed) |
|
virtual void | setAcceleration (const F32 acceleration) |
| Set the unit's acceleration in metres per second squared.
|
|
virtual F32 | getMovementSpeed () const |
| Get the unit's current movement speed.
|
|
virtual F32 | getAcceleration () const |
| Get the unit's acceleration rate.
|
|
void | setMovementTolerance (const F32 movementTolerance) |
| Set destination tolerance.
|
|
F32 | getMovementTolerance () const |
| Get the units current movement tolerance.
|
|
SceneGraphNode * | getBoundNode () const |
| Get bound node.
|
|
virtual void | setAttribute (U32 attributeID, I32 initialValue) |
|
virtual I32 | getAttribute (U32 attributeID) const |
|
| PROPERTY_RW (UnitType, type, UnitType::COUNT) |
|
| GUIDWrapper () noexcept |
|
| GUIDWrapper (const GUIDWrapper &old) noexcept |
|
| GUIDWrapper (GUIDWrapper &&old) noexcept |
|
virtual | ~GUIDWrapper ()=default |
|
FORCE_INLINE I64 | getGUID () const noexcept |
|
GUIDWrapper & | operator= (const GUIDWrapper &old)=delete |
|
GUIDWrapper & | operator= (GUIDWrapper &&other)=delete |
|
NPC base class. Every character in the game is an NPC by default except the Player.
Definition at line 45 of file NPC.h.
void Divide::NPC::update |
( |
U64 |
deltaTimeUS | ) |
|
|
overridevirtual |
Update this character for drawing a new frame. Updates one tick in the render loop. In order for the agents to be updated, you first need to call the detourCrowd update function. What is updated specifically is up to a specific implementation of Character, but at the very least the position in the scene should be updated to reflect the detour agent position (possibly with additional physics engine clipping and collision testing).
Reimplemented from Divide::Character.
Definition at line 15 of file NPC.cpp.