Changeset 3501
- Timestamp:
- 03/15/10 06:23:12 (5 months ago)
- Location:
- tutorials/branches/0185_GEN_PHYSICS_REFACTOR_2/Tutorial4
- Files:
-
- 5 modified
-
Tutorial4/src/GameClient.cpp (modified) (3 diffs)
-
scripts/client/GameClient.lua (modified) (3 diffs)
-
scripts/client/init.lua (modified) (2 diffs)
-
scripts/core/Environment.lua (modified) (2 diffs)
-
scripts/core/debugHelp.lua (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tutorials/branches/0185_GEN_PHYSICS_REFACTOR_2/Tutorial4/Tutorial4/src/GameClient.cpp
r3480 r3501 38 38 #include <Zen/Core/Math/Quaternion4.hpp> 39 39 40 #include <Zen/Core/Scripting/I_ScriptEngine.hpp> 41 #include <Zen/Core/Scripting/I_ScriptModule.hpp> 42 #include <Zen/Core/Scripting/I_ScriptType.hpp> 43 #include <Zen/Core/Scripting/ObjectReference.hpp> 40 #include <Zen/Core/Scripting.hpp> 41 //#include <Zen/Core/Scripting/I_ScriptEngine.hpp> 42 //#include <Zen/Core/Scripting/I_ScriptModule.hpp> 43 //#include <Zen/Core/Scripting/I_ScriptType.hpp> 44 //#include <Zen/Core/Scripting/ObjectReference.hpp> 44 45 45 46 #include <Zen/Engine/Core/I_GameGroup.hpp> … … 225 226 GameClient::initPhysics() 226 227 { 227 m_baseGame.initPhysicsService("Z Newton");228 m_baseGame.initPhysicsService("ZODE"); 228 229 setupPhysicsMaterials(); 229 m_baseGame.initPhysicsResourceService("Z Newton");230 m_baseGame.initPhysicsResourceService("ZODE"); 230 231 } 231 232 … … 305 306 { 306 307 // TODO Register additional script types here 308 309 Zen::Scripting::script_type<GameClient>(base().getGameClientScriptType()) 310 .addMethod("init", &GameClient::init) 311 ; 307 312 308 313 // Tell m_base we're done. After the modules are activated then you cannot -
tutorials/branches/0185_GEN_PHYSICS_REFACTOR_2/Tutorial4/scripts/client/GameClient.lua
r3495 r3501 1 print("=============\nLoading GameClient scripts...\n============") 1 2 2 3 … … 24 25 -- ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- 25 26 function GameClient:initialize() 27 self:init(); 28 26 29 rootGroup = self:getRootGroup() 27 30 … … 42 45 function GameClient:getActionMap(actionMapName) 43 46 -- This is in Game now, not GameClient 44 return self:get ActionMap(actionMapName)47 return self:getGame():getActionMap(actionMapName) 45 48 end 46 49 -
tutorials/branches/0185_GEN_PHYSICS_REFACTOR_2/Tutorial4/scripts/client/init.lua
r3480 r3501 1 package.path=package.path..";scripts \\?.lua"1 package.path=package.path..";scripts/?.lua" 2 2 3 require "core.Environment" 4 require "client.GameClient" 3 print("=============\nLoading Tutorial4 initialization scripts...\n============"); 4 5 print("Loading core.Environment"); 6 require("core.Environment"); 7 8 print("Loading client.GameClient"); 9 require("client.GameClient"); 5 10 6 11 -- Debug 7 -- require "core.debugHelp"; 8 12 require "core.debugHelp"; 13 14 -- Turn on tracing 15 DebugInfo.trace = true; 16 9 17 -- ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- 10 18 -- Create a game client of the specified type … … 15 23 -- ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- 16 24 -- Initialize the main taBBall Game 17 print("=============\nInitializing taBBallClient...\n============")25 print("=============\nInitializing Tutorial 4 Client...\n============") 18 26 gameClient:initialize() -
tutorials/branches/0185_GEN_PHYSICS_REFACTOR_2/Tutorial4/scripts/core/Environment.lua
r989 r3501 1 print("Loaded Environment.lua"); 1 2 --[[ 2 3 … … 7 8 8 9 ]] 10 11 print("=============\nLoading Environment scripts...\n============") 9 12 10 13 -- Get the environment -
tutorials/branches/0185_GEN_PHYSICS_REFACTOR_2/Tutorial4/scripts/core/debugHelp.lua
r3480 r3501 1 1 2 local DebugInfo = 2 print("=============\nLoading Debug scripts...\n============") 3 4 DebugInfo = 3 5 { 4 6 nextIndex = 1; 7 trace = false; 5 8 } 6 9 … … 21 24 DebugInfo.nextIndex = DebugInfo.nextIndex + 1; 22 25 23 --local s = info.short_src 24 --print(s .. ":" .. line) 26 if (DebugInfo.trace) then 27 local s = info.short_src 28 print(s .. ":" .. line) 29 end 25 30 end 26 31
