From 0e2401ef6953323d5c0b733291fd224fd6062179 Mon Sep 17 00:00:00 2001 From: Linda Andersson Date: Mon, 25 Nov 2013 11:49:40 +0100 Subject: [PATCH] test with physics dll --- Code/GameLogic/GameLogic.vcxproj | 8 +++++++ Code/GameLogic/IGame.cpp | 4 ++++ Code/GameLogic/IGame.h | 1 + Code/GameLogic/Player.cpp | 40 ++++++++++++++++---------------- Code/GameLogic/TestGLMain.cpp | 2 +- 5 files changed, 34 insertions(+), 21 deletions(-) diff --git a/Code/GameLogic/GameLogic.vcxproj b/Code/GameLogic/GameLogic.vcxproj index ce35dd0b..485f7f94 100644 --- a/Code/GameLogic/GameLogic.vcxproj +++ b/Code/GameLogic/GameLogic.vcxproj @@ -142,6 +142,14 @@ + + {104fa3e9-94d9-4e1d-a941-28a03bc8a095} + false + true + false + false + false + {2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee} diff --git a/Code/GameLogic/IGame.cpp b/Code/GameLogic/IGame.cpp index 268f5428..8fe25170 100644 --- a/Code/GameLogic/IGame.cpp +++ b/Code/GameLogic/IGame.cpp @@ -37,4 +37,8 @@ void IGame::Update() void IGame::Render() { gameModule->Render(); +} +Game* IGame::getGameModule() +{ + return gameModule; } \ No newline at end of file diff --git a/Code/GameLogic/IGame.h b/Code/GameLogic/IGame.h index 24edd633..0fd34887 100644 --- a/Code/GameLogic/IGame.h +++ b/Code/GameLogic/IGame.h @@ -25,6 +25,7 @@ namespace GameLogic void StartGame(); void Update(); void Render(); + Game* getGameModule(); private: }; } diff --git a/Code/GameLogic/Player.cpp b/Code/GameLogic/Player.cpp index a3b103be..37042f6c 100644 --- a/Code/GameLogic/Player.cpp +++ b/Code/GameLogic/Player.cpp @@ -46,30 +46,30 @@ Player::Player(void) { life = 10; - UniquePointer rigidBody = API::Instance().CreateSimpleRigidBody(); - ref = API::Instance().AddObject(rigidBody); - //ref = API::Instance().AddObject(API::Instance().CreateSimpleRigidBody()); - const ICustomBody* rB; + //UniquePointer rigidBody = API::Instance().CreateSimpleRigidBody(); + //ref = API::Instance().AddObject(rigidBody); + ////ref = API::Instance().AddObject(API::Instance().CreateSimpleRigidBody()); + //const ICustomBody* rB; - //rB = &API::Instance().Peek(ref); - //if( rB == &Error::nobody) - //{ - // //error - //} + ////rB = &API::Instance().Peek(ref); + ////if( rB == &Error::nobody) + ////{ + //// //error + ////} - API::Instance().SetCenter(ref, Oyster::Math::Float3::null); - API::Instance().SetMass_KeepMomentum(ref, 20); - // get Tensor matrix (tröghetsmonent) - //API::Instance().SetMomentOfInertiaTensor_KeepMomentum(ref, tensorMatrix ) - - //Oyster::Math::Float3 ve = rB->GetCenter(); - API::Instance().SetDeltaTime(0.01f); + //API::Instance().SetCenter(ref, Oyster::Math::Float3::null); + //API::Instance().SetMass_KeepMomentum(ref, 20); + //// get Tensor matrix (tröghetsmonent) + ////API::Instance().SetMomentOfInertiaTensor_KeepMomentum(ref, tensorMatrix ) + // + ////Oyster::Math::Float3 ve = rB->GetCenter(); + //API::Instance().SetDeltaTime(0.01f); - //API::Instance().ApplyForceAt(ref, rB->GetCenter(), Oyster::Math::Float3::null); - - //API::Instance().SetAction(ColisionEvent); + ////API::Instance().ApplyForceAt(ref, rB->GetCenter(), Oyster::Math::Float3::null); + // + ////API::Instance().SetAction(ColisionEvent); - //API::Instance().Update(); + ////API::Instance().Update(); diff --git a/Code/GameLogic/TestGLMain.cpp b/Code/GameLogic/TestGLMain.cpp index 6b578a06..bf8cebbe 100644 --- a/Code/GameLogic/TestGLMain.cpp +++ b/Code/GameLogic/TestGLMain.cpp @@ -10,7 +10,7 @@ #include "Core/Core.h" #include "Render\Preparations\Preparations.h" #include "IGame.h" -#include "InputController.h" +//#include "InputController.h"