

Definition at line 19 of file LevelScript.h.
Public Member Functions | |
| LevelScript (Level *aLevel) | |
| Create new plan holder. | |
| void | updateScript () |
| Update level (plan dialogs, do anim, . | |
| virtual void | interruptPlan () |
| Level * | level () |
| Command * | createCommand (int funcRef) |
| Create ScriptCmd for show. | |
| int | addModel (Cube *new_model, Unit *new_unit) |
| Add model at scene. | |
| Cube * | getModel (int model_index) |
| Cube * | askField (const V2 &loc) |
| Returns model at location. | |
| void | addSound (const std::string &name, const Path &file) |
| void | playSound (const std::string &name, int volume) |
|
|
Create new plan holder.
Definition at line 29 of file LevelScript.cpp. 00030 {
00031 m_level = aLevel;
00032 registerGameFuncs();
00033 }
|
|
||||||||||||
|
Add model at scene.
Definition at line 76 of file LevelScript.cpp. 00077 {
00078 std::auto_ptr<Cube> ptr_model(new_model);
00079 std::auto_ptr<Unit> ptr_unit(new_unit);
00080
00081 ptr_model->takeDialogs(dialogs());
00082 return room()->addModel(ptr_model.release(), ptr_unit.release());
00083 }
|
|
||||||||||||
|
Definition at line 102 of file LevelScript.cpp. 00103 {
00104 room()->addSound(name, file);
00105 }
|
|
|
Returns model at location.
Definition at line 95 of file LevelScript.cpp. 00096 {
00097 return room()->askField(loc);
00098 }
|
|
|
Create ScriptCmd for show. Command will be executed in this script context.
Definition at line 42 of file LevelScript.cpp.
|
|
|
Definition at line 86 of file LevelScript.cpp. 00087 {
00088 return room()->getModel(model_index);
00089 }
|
|
|
Reimplemented from Planner. Definition at line 59 of file LevelScript.cpp. 00060 {
00061 Planner::interruptPlan();
00062 //NOTE: checkActive is before unBusyUnits to allow script
00063 // make busy unwanted fishes
00064 room()->checkActive();
00065 room()->unBusyUnits();
00066 }
|
|
|
Definition at line 31 of file LevelScript.h. 00031 { return m_level; }
|
|
||||||||||||
|
Definition at line 108 of file LevelScript.cpp. 00109 {
00110 room()->playSound(name, volume);
00111 }
|
|
|
Update level (plan dialogs, do anim, . ..). Definition at line 52 of file LevelScript.cpp. 00053 {
00054 m_script->doString("script_update()");
00055 satisfyPlan();
00056 }
|
1.4.2