Actor Class Reference

Generic client-visible object. More...

#include <actor.hpp>

Inheritance diagram for Actor:

Thing Being Character Monster NPC

List of all members.

Public Member Functions

 Actor (ThingType type)
 Constructor.
void setPosition (const Point &p)
 Sets the coordinates.
const PointgetPosition () const
 Gets the coordinates.
int getUpdateFlags () const
 Gets what changed in the actor.
void raiseUpdateFlags (int n)
 Sets some changes in the actor.
void clearUpdateFlags ()
 Clears changes in the actor.
void setSize (int s)
 Sets actor bounding circle radius.
int getSize () const
int getPublicID () const
 Get public ID.
void setPublicID (int id)
 Set public ID.
virtual unsigned char getWalkMask () const
 Gets the way the actor blocks pathfinding for other actors.
virtual void setMap (MapComposite *map)
 Overridden in order to update the walkmap.

Protected Member Functions

virtual Map::BlockType getBlockType () const
 Gets the way the actor blocks pathfinding for other actors.

Protected Attributes

unsigned short mActionTime
 Delay until next action.


Detailed Description

Generic client-visible object.

Keeps track of position, size and what to update clients about.

Definition at line 47 of file actor.hpp.


Member Function Documentation

void Actor::setPosition ( const Point p  ) 

Sets the coordinates.

Also updates the walkmap of the map the actor is on.

Parameters:
p the coordinates.

Reimplemented in Character.

Definition at line 28 of file actor.cpp.

References Map::blockTile(), Map::freeTile(), getBlockType(), MapComposite::getMap(), Thing::getMap(), getPosition(), Point::x, and Point::y.

Referenced by Being::move(), and SpawnArea::update().

const Point& Actor::getPosition (  )  const [inline]

int Actor::getPublicID (  )  const [inline]

Get public ID.

Returns:
the public ID, 65535 if none yet.

Definition at line 106 of file actor.hpp.

Referenced by Being::damage(), MapContent::deallocate(), and Being::died().

void Actor::setPublicID ( int  id  )  [inline]

Set public ID.

The actor shall not have any public ID yet.

Definition at line 112 of file actor.hpp.

Referenced by MapContent::allocate().


Member Data Documentation

unsigned short Actor::mActionTime [protected]

Delay until next action.

Definition at line 133 of file actor.hpp.

Referenced by Being::move(), and Character::perform().


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:46 2009 for TMW Server Collection by  doxygen 1.5.5