Changeset 8417 in orxonox.OLD for branches/script_engine/src
- Timestamp:
- Jun 14, 2006, 6:31:10 PM (18 years ago)
- Location:
- branches/script_engine/src
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/gui/gl/glgui_box.cc
r8145 r8417 17 17 18 18 #include "glgui_box.h" 19 #include <cassert> 19 20 20 21 namespace OrxGui -
branches/script_engine/src/lib/gui/gl/glgui_handler.cc
r8324 r8417 23 23 24 24 #include "class_list.h" 25 #include <cassert> 25 26 26 27 -
branches/script_engine/src/lib/script_engine/lunartest2.lua
r8408 r8417 22 22 23 23 function main(arg) 24 io.write("hello i am main! ")24 io.write("hello i am main!\n") 25 25 -- use parameter 26 26 io.write("main received ", arg) 27 27 io.write(" as parameter\n") 28 28 29 o = Object() 30 o:printName() 29 31 30 --call member of an inserted object 32 31 Obj:printName() 33 32 34 33 --create object of a registered type 35 --o = Object()36 --o:printName()34 o = Object() 35 o:printName() 37 36 38 37 --take returnvalue from c -
branches/script_engine/src/world_entities/script_trigger.cc
r8408 r8417 142 142 { 143 143 testScriptingFramework(); 144 /*if(!(script->selectFunction(this->functionName,0)) )144 if(!(script->selectFunction(this->functionName,0)) ) 145 145 printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str()); 146 146 if( !(script->executeFunction()) ) 147 printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str()); */147 printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str()); 148 148 } 149 149 } -
branches/script_engine/src/world_entities/space_ships/helicopter.h
r8408 r8417 12 12 #include "sound_buffer.h" 13 13 #include "sound_source.h" 14 15 #include "script_class.h" 14 16 15 17 class Helicopter : public Playable … … 38 40 virtual void process(const Event &event); 39 41 40 virtual void moveUp(bool move){bUp = move;}; 42 virtual void moveUp(bool move){bAscend = move;}; 43 virtual void moveDown(bool move){bDescend = move;}; 41 44 42 45 … … 80 83 }; 81 84 82 //CREATE_SCRIPTABLE_CLASS(Helicopter, CL_HELICOPTER, 83 // addMethod("moveUp", ExecutorLua1<Object,bool>(&Helicopter::moveUp)) 84 // ); 85 CREATE_SCRIPTABLE_CLASS(Helicopter, CL_HELICOPTER, 86 addMethod("moveUp", ExecutorLua1<Helicopter,bool>(&Helicopter::moveUp)) 87 ->addMethod("moveDown", ExecutorLua1<Helicopter,bool>(&Helicopter::moveDown)) 88 ); 85 89 86 90
Note: See TracChangeset
for help on using the changeset viewer.