Thing Class Reference

#include <thing.hpp>

Inheritance diagram for Thing:

Object TriggerArea Item MovingObject Being Character Monster List of all members.

Detailed Description

Base class for in-game objects.

Knows only its type and the map is resides on.

Definition at line 46 of file thing.hpp.

Public Member Functions

 Thing (int type)
 Constructor.
virtual ~Thing ()
 Empty virtual destructor.
int getType () const
 Gets type of this thing.
bool isVisible () const
 Returns whether this thing is visible on the map or not.
bool canMove () const
 Returns whether this thing can move on the map or not.
bool canFight () const
 Returns whether this thing can fight or not.
virtual void update ()=0
 Updates the internal status.
int getMapId () const
 Gets the map this thing is located on.
void setMapId (int mapId)
 Sets the map this thing is located on.

Private Attributes

unsigned short mMapId
 ID of the map this thing is on.
char mType
 Type of this thing.


Constructor & Destructor Documentation

Thing::Thing int  type  )  [inline]
 

Constructor.

Definition at line 52 of file thing.hpp.

virtual Thing::~Thing  )  [inline, virtual]
 

Empty virtual destructor.

Definition at line 59 of file thing.hpp.


Member Function Documentation

bool Thing::canFight  )  const [inline]
 

Returns whether this thing can fight or not.

(Being)

Definition at line 85 of file thing.hpp.

bool Thing::canMove  )  const [inline]
 

Returns whether this thing can move on the map or not.

(MovingObject)

Definition at line 78 of file thing.hpp.

int Thing::getMapId  )  const [inline]
 

Gets the map this thing is located on.

Returns:
ID of map.

Reimplemented in Character.

Definition at line 99 of file thing.hpp.

int Thing::getType  )  const [inline]
 

Gets type of this thing.

Returns:
the type of this thing.

Definition at line 66 of file thing.hpp.

bool Thing::isVisible  )  const [inline]
 

Returns whether this thing is visible on the map or not.

(Object)

Definition at line 72 of file thing.hpp.

void Thing::setMapId int  mapId  )  [inline]
 

Sets the map this thing is located on.

Reimplemented in Character.

Definition at line 105 of file thing.hpp.

virtual void Thing::update  )  [pure virtual]
 

Updates the internal status.

Implemented in Character, Item, Monster, and TriggerArea.


Member Data Documentation

unsigned short Thing::mMapId [private]
 

ID of the map this thing is on.

Definition at line 109 of file thing.hpp.

char Thing::mType [private]
 

Type of this thing.

Reimplemented in Item.

Definition at line 110 of file thing.hpp.


The documentation for this class was generated from the following file:
Generated on Fri Mar 30 15:39:18 2007 for TMW Server by  doxygen 1.3.9.1