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 |
| Layer * | getLayer () const |
| virtual Mask * | getMask () 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 |
| Layer * | layer |
| char | name [DEFAULT_STRING_SIZE] |
| Annchienta::Entity::Entity | ( | const char * | name = "none" |
) |
Creates a new entity.
| name | Give the entity a name. |
| virtual Annchienta::Entity::~Entity | ( | ) | [virtual] |
| virtual bool Annchienta::Entity::collidesWith | ( | Entity * | other | ) | const [virtual] |
Check if this Entity collides with another Entity.
Reimplemented in SwigDirector_Entity, SwigDirector_Tile, SwigDirector_StaticObject, and SwigDirector_Person.
| virtual void Annchienta::Entity::draw | ( | ) | [pure virtual] |
Draws the entity to the screen.
Implemented in SwigDirector_Entity, SwigDirector_Tile, SwigDirector_StaticObject, SwigDirector_Person, Annchienta::StaticObject, and Annchienta::Tile.
| virtual int Annchienta::Entity::getDepth | ( | ) | [pure virtual] |
Implemented in SwigDirector_Entity, SwigDirector_Tile, SwigDirector_StaticObject, SwigDirector_Person, Annchienta::StaticObject, and Annchienta::Tile.
| virtual EntityType Annchienta::Entity::getEntityType | ( | ) | const [pure virtual] |
Get the type of this Entity.
Implemented in SwigDirector_Entity, SwigDirector_Tile, SwigDirector_StaticObject, SwigDirector_Person, Annchienta::Person, Annchienta::StaticObject, and Annchienta::Tile.
| Layer* Annchienta::Entity::getLayer | ( | ) | const |
| virtual Mask* Annchienta::Entity::getMask | ( | ) | const [pure virtual] |
Implemented in SwigDirector_Entity, SwigDirector_Tile, SwigDirector_StaticObject, SwigDirector_Person, Annchienta::StaticObject, and Annchienta::Tile.
| 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.
Implemented in SwigDirector_Entity, SwigDirector_Tile, SwigDirector_StaticObject, SwigDirector_Person, Annchienta::StaticObject, and Annchienta::Tile.
| const char* Annchienta::Entity::getName | ( | ) | const |
| bool Annchienta::Entity::isDrawn | ( | ) | const |
| 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.
| 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.
| void Annchienta::Entity::setName | ( | const char * | name | ) |
| name | New name for the Entity. |
| virtual void Annchienta::Entity::update | ( | ) | [pure virtual] |
Updates the entity, eg. update sprite, position, ...
Implemented in SwigDirector_Entity, SwigDirector_Tile, SwigDirector_StaticObject, SwigDirector_Person, Annchienta::Person, Annchienta::StaticObject, and Annchienta::Tile.
bool Annchienta::Entity::drawn [protected] |
Layer* Annchienta::Entity::layer [protected] |
char Annchienta::Entity::name[DEFAULT_STRING_SIZE] [protected] |
1.5.7.1