Changeset 10045 for code/branches/ScriptableController
- Timestamp:
- May 6, 2014, 4:02:07 PM (11 years ago)
- Location:
- code/branches/ScriptableController
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ScriptableController/data/gui/scripts/testscript.lua
r10037 r10045 8 8 9 9 10 orxonox.ScriptController:moveToPosition(x, y, z) 10 local ctrl = orxonox.ScriptController:getScriptController() 11 --orxonox.ScriptController:moveToPosition(x, y, z) 12 --ctrl.moveToPosition(x,y,z) 13 14 local docks = orxonox.Dock:getNumberOfActiveDocks() 15 local docklist = {} 16 for i = 0, docks-1 do 17 table.insert(docklist, orxonox.Dock:getActiveDockAtIndex(i)) 18 end 19 local dock = docklist[1] 20 if dock ~= nil then 21 dock:dock() 22 end 23 24 --orxonox.execute("setPause 1") 11 25 12 26 13 -
code/branches/ScriptableController/src/orxonox/CMakeLists.txt
r9348 r10045 64 64 infos/PlayerInfo.h 65 65 sound/SoundManager.h 66 controllers/ScriptController.h 66 67 PCH_FILE 67 68 OrxonoxPrecompiledHeaders.h -
code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc
r10038 r10045 30 30 #include "core/CoreIncludes.h" 31 31 #include "worldentities/ControllableEntity.h" 32 #include "core/LuaState.h" 32 33 #include <cmath> 33 34 … … 64 65 } 65 66 67 ScriptController* ScriptController::getScriptController() 68 { 69 orxout() << "Great success!" << std::endl; 70 for(ObjectList<ScriptController>::iterator it = 71 ObjectList<ScriptController>::begin(); 72 it != ObjectList<ScriptController>::end(); ++it) 73 { 74 // TODO: do some selection here. Currently just returns the first one 75 return *it; 76 77 } 78 return NULL; 79 } 80 81 82 66 83 void ScriptController::moveToPosition_beta(float x, float y, float z ) 67 84 { -
code/branches/ScriptableController/src/orxonox/controllers/ScriptController.h
r10034 r10045 59 59 60 60 61 const Vector3& getPosition();61 static ScriptController* getScriptController(); 62 62 63 63 /* virtual void tick(float dt);*/ 64 64 65 65 // tolua_end 66 const Vector3& getPosition(); 66 67 67 68 private:
Note: See TracChangeset
for help on using the changeset viewer.