Annchienta::Entity Class Reference

Inherited by Annchienta::StaticObject, Annchienta::Tile, and SwigDirector_Entity.

List of all members.

Public Member Functions

virtual bool collidesWith (Entity *other) const
virtual void draw ()=0
 Entity (const char *name="none")
virtual int getDepth ()=0
virtual EntityType getEntityType () const =0
LayergetLayer () const
virtual MaskgetMask () const =0
virtual Point getMaskPosition () const =0
const char * getName () const
bool isDrawn () const
void setDrawn (bool drawn)
void setLayer (Layer *layer)
void setName (const char *name)
virtual void update ()=0
virtual ~Entity ()

Protected Attributes

bool drawn
Layerlayer
char name [DEFAULT_STRING_SIZE]


Detailed Description

This represents an entity in the Map. This can be about anything, a Tile, a StaticObject, a Person...

Constructor & Destructor Documentation

Annchienta::Entity::Entity ( const char *  name = "none"  ) 

Creates a new entity.

Parameters:
name Give the entity a name.

virtual Annchienta::Entity::~Entity (  )  [virtual]


Member Function Documentation

virtual bool Annchienta::Entity::collidesWith ( Entity other  )  const [virtual]

Check if this Entity collides with another Entity.

Returns:
If they collide.

Reimplemented in SwigDirector_Entity, SwigDirector_Tile, SwigDirector_StaticObject, and SwigDirector_Person.

virtual void Annchienta::Entity::draw (  )  [pure virtual]

virtual int Annchienta::Entity::getDepth (  )  [pure virtual]

virtual EntityType Annchienta::Entity::getEntityType (  )  const [pure virtual]

Layer* Annchienta::Entity::getLayer (  )  const

Returns:
The layer to which this entity belongs.

virtual Mask* Annchienta::Entity::getMask (  )  const [pure virtual]

virtual Point Annchienta::Entity::getMaskPosition (  )  const [pure virtual]

Use this when you want to know where you should place the Mask for this Entity if you want to check collision with other Entities.

Returns:
A Point describing where the Mask should be placed.

Implemented in SwigDirector_Entity, SwigDirector_Tile, SwigDirector_StaticObject, SwigDirector_Person, Annchienta::StaticObject, and Annchienta::Tile.

const char* Annchienta::Entity::getName (  )  const

Returns:
The name of this entity.

bool Annchienta::Entity::isDrawn (  )  const

Returns:
Is this Entity already drawn this frame?

void Annchienta::Entity::setDrawn ( bool  drawn  ) 

This is used to keep track of which Entities have been drawn already this frame and which aren't.

Parameters:
drawn Set this to true before drawing if you don't want this to be drawn.

void Annchienta::Entity::setLayer ( Layer layer  ) 

Sets the layer to which this Entity belongs. This is automatically done when using Layer::addObject, please us that instead.

Parameters:
layer Layer to which this Entity should be added.

void Annchienta::Entity::setName ( const char *  name  ) 

Parameters:
name New name for the Entity.

virtual void Annchienta::Entity::update (  )  [pure virtual]


Member Data Documentation

bool Annchienta::Entity::drawn [protected]

char Annchienta::Entity::name[DEFAULT_STRING_SIZE] [protected]


Generated on Wed Feb 4 16:31:47 2009 for Annchienta by  doxygen 1.5.7.1