Annchienta::Area Class Reference
List of all members.
Detailed Description
An area is a rectangular field on a map. It is used to trigger code when the player walks into one of these areas, thus adding interactivity to maps.
Constructor & Destructor Documentation
Annchienta::Area::Area |
( |
Point |
p1, |
|
|
Point |
p2, |
|
|
bool |
visible = false | |
|
) |
| | |
Create a new area.
- Parameters:
-
| p1 | The upper left corner of the area. |
| p2 | The bottom right corner of the area. |
| visible | If the Area should be visible. |
Annchienta::Area::~Area |
( |
|
) |
|
Member Function Documentation
bool Annchienta::Area::hasPoint |
( |
Point |
point |
) |
|
Checks if the given Point lies in this area.
bool Annchienta::Area::hasTile |
( |
Tile * |
tile |
) |
|
Checks if the given Tile lies in this area. (Entirely)
bool Annchienta::Area::isVisible |
( |
|
) |
const |
- Returns:
- If the Area is visible.
void Annchienta::Area::onCollision |
( |
|
) |
|
Trigger collision. This is done by the MapManager, but can also be emulated manually.
void Annchienta::Area::setOnCollisionCode |
( |
const char * |
code |
) |
|
Sets the code to be executed on collision with the player.
- Parameters:
-
| code | The code you want to be executed. |
void Annchienta::Area::setOnCollisionScript |
( |
const char * |
filename |
) |
|
Sets the script to be executed on collision with the player.
- Parameters:
-
| filename | Filename of the script you want to be executed. |
void Annchienta::Area::setVisible |
( |
bool |
visible |
) |
|
If the Area is visible, a visual indication will be drawn over it.
- Parameters:
-
| visible | If the Area should be visible. |
Member Data Documentation