Adonthell
0.4
|
To notify when a character entered a mapsquare. More...
#include <map_event.h>
Public Member Functions | |
enter_event () | |
Default constructor. | |
![]() | |
map_event () | |
Default constructor. | |
void | put_state (ogzstream &) const |
Saves the basic event data (such as the type or script data) to a file. | |
bool | get_state (igzstream &) |
Loads the basic event date from a file. | |
bool | equals (const event *evnt) |
Compare two map events for equality. | |
s_int32 | execute (const event *evnt) |
Executes the script associated with this map event. | |
![]() | |
event () | |
Constructor. | |
virtual | ~event () |
Destructor. | |
void | clear () |
Cleanup. | |
void | set_script (string filename, PyObject *args=NULL) |
Sets a script to be executed whenever the event occurs. | |
void | set_callback (PyObject *callback, PyObject *args=NULL) |
Sets a python function/method to be executed whenever the event occurs. | |
void | set_callback (const Functor0 &callback) |
Sets a C function/C++ method to be executed whenever the event occurs. | |
u_int8 | type () const |
Get the event's type. | |
const string & | id () const |
Get the event's id. | |
void | set_id (const string &id) |
Assign an id to the event, so it may be retrieved from an event_list later on, without having a pointer to it. | |
bool | registered () const |
Test whether the event is registered with the event handler. | |
void | set_registered (bool reg) |
Set whether the event is registered with the event handler. | |
void | set_list (event_list *list) |
Tell the whether it is kept in an event_list. | |
s_int32 | repeat () const |
Return whether this event should be repeated. | |
void | set_repeat (s_int32 count) |
Set whether this event should be repeated. | |
virtual void | pause () |
Disable the event temporarily. | |
virtual void | resume () |
Re-enable an event that has been paused. | |
bool | is_paused () const |
Check whether the event is temporarily disabled or not. |
Additional Inherited Members | |
![]() | |
s_int32 | submap |
Submap index (-1 for any). | |
s_int32 | x |
X position (-1 for any). | |
s_int32 | y |
Y position (-1 for any). | |
s_int8 | dir |
Direction where the character is looking (-1 for any). | |
s_int32 | map |
Useless (for now). | |
mapcharacter * | c |
Pointer to the mapcharacter that can launch this event (NULL for any). |
To notify when a character entered a mapsquare.
Definition at line 109 of file map_event.h.
enter_event::enter_event | ( | ) |
Default constructor.
Definition at line 125 of file map_event.cc.