#include <Avatar.h>
Public Member Functions | |
std::string | getId () const |
Get the Entity id of this Avatar. | |
EntityPtr | getEntity () const |
Get the Entity this Avatar refers to. | |
View * | getView () const |
Connection * | getConnection () const |
double | getWorldTime () |
get the current local approximation of world time. | |
const EntityRef & | getWielded () const |
void | drop (Entity *, const WFMath::Point< 3 > &pos, const std::string &loc) |
Drop an object in the Avatar's inventory at the given location. | |
void | drop (Entity *, const WFMath::Vector< 3 > &offset=WFMath::Vector< 3 >(0, 0, 0)) |
Drop an object in the Avatar's inventory at the Avatar's feet. | |
void | take (Entity *) |
Move an entity into the Avatar's inventory. | |
void | touch (Entity *) |
Touch an entity. | |
void | say (const std::string &) |
Say something (in-game). | |
void | emote (const std::string &) |
Emote something (in-game). | |
void | moveToPoint (const WFMath::Point< 3 > &) |
Have the character move towards a position. | |
void | moveInDirection (const WFMath::Vector< 3 > &) |
Set the character's velocity. | |
void | moveInDirection (const WFMath::Vector< 3 > &, const WFMath::Quaternion &) |
Set the character's velocity and orientation. | |
void | place (Entity *, Entity *container, const WFMath::Point< 3 > &pos=WFMath::Point< 3 >(0, 0, 0)) |
Place an entity inside another one. | |
void | wield (Entity *entity) |
Wield an entity which is inside the Avatar's inventory. | |
void | useOn (Entity *entity, const WFMath::Point< 3 > &position, const std::string &op) |
Use the currently wielded entity (tool) on another entity. | |
void | attack (Entity *entity) |
Attach the specified entity. | |
const TypeInfoArray & | getUseOperationsForWielded () const |
Get a list of operations supported by the currently wielded entity (tool) If no entity is wielded, or the entity does no provide an operations list, this will return an empty array. | |
Public Attributes | |
sigc::signal< void, Entity * > | GotCharacterEntity |
Emitted when the character entity of this Avatar is valid (and presumably, visible). | |
sigc::signal< void, Entity * > | InvAdded |
An object was added to the inventory. | |
sigc::signal< void, Entity * > | InvRemoved |
An object was removed from the inventory. | |
sigc::signal< void, Entity *, const Atlas::Objects::Operation::RootOperation & > | Hear |
emitted when this Avatar hears something. | |
Protected Member Functions | |
Avatar (Account *pl, const std::string &entId) | |
Create a new Avatar object. | |
void | updateWorldTime (double t) |
called by the IG router for each op it sees with a valid 'seconds' attribute set. | |
Friends | |
class | Account |
class | AccountRouter |
class | IGRouter |
|
Create a new Avatar object.
|
|
Attach the specified entity.
|
|
called by the IG router for each op it sees with a valid 'seconds' attribute set. We use this to synchronize the local world time up. |
|
Use the currently wielded entity (tool) on another entity.
|
|
Emitted when the character entity of this Avatar is valid (and presumably, visible). This will happen some time after the InGame signal is emitted. A client might wish to show some kind of 'busy' animation, eg an hour-glass, while waiting for this signal. |
|
emitted when this Avatar hears something. Passes the source of the sound, and the operation that was heard, for example a Talk. |