|
| ICharacter (CharacterId id) |
|
bool | operator== (const ICharacter &character) const |
|
bool | operator!= (const ICharacter &character) const |
|
CharacterId | getId () const |
|
virtual void | setPosition (const glm::vec3 &position) |
|
const glm::vec3 & | getPosition () const |
|
virtual void | setOrientation (float orientation) |
|
float | getOrientation () const |
|
virtual void | setSpeed (float speed) |
| Sets the speed for the character in m/s. More...
|
|
float | getSpeed () const |
|
virtual void | setAttribute (const std::string &key, const std::string &value) |
| Set an attribute that can be used for debugging. More...
|
|
const CharacterAttributes & | getAttributes () const |
| Get the debugger attributes.
|
|
virtual void | update (int64_t dt, bool debuggingActive) |
| override this method to let your own ICharacter implementation tick with the Zone::update More...
|
|
std::shared_ptr< ICharacter > | ptr () |
|
Class that should be extended by the AI controlled entity class.
It uses a CharacterId to identify the character in the game. The AI class has a reference to its controlled ICharacter
instance.
- Note
- Update the values of the
ICharacter
class only in in the ICharacter::update() method or from within the Zone callbacks. Otherwise you will run into race conditions if you run with multiple threads.
You often need access to your world your character is living in. You need access to this data to resolve the CharacterId's in the IFilter implementations, to interact with other entities that are not SimpleAI controlled and so on. You can use the provided character_cast function in your TreeNode, IFilter or ICondition implementations.