Merge remote-tracking branch 'origin/GameLogic' into Camera-Merge-buffer

Conflicts:
	Code/Game/GameLogic/Portal.cpp
This commit is contained in:
Dander7BD 2014-02-14 10:34:00 +01:00
commit 78f47cd3ae
2 changed files with 19 additions and 18 deletions

View File

@ -23,13 +23,13 @@ Object* Level::createGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
{ {
case ObjectSpecialType_None: case ObjectSpecialType_None:
{ {
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_Sky: case ObjectSpecialType_Sky:
{ {
float skySize = ((SkyAttributes*)obj)->skySize; float skySize = ((SkyAttributes*)obj)->skySize;
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_World: case ObjectSpecialType_World:
@ -39,28 +39,28 @@ Object* Level::createGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
float worldSize = ((WorldAttributes*)obj)->worldSize; float worldSize = ((WorldAttributes*)obj)->worldSize;
float atmosphereSize = ((WorldAttributes*)obj)->atmoSphereSize; float atmosphereSize = ((WorldAttributes*)obj)->atmoSphereSize;
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_Building: case ObjectSpecialType_Building:
{ {
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
case ObjectSpecialType_Stone: case ObjectSpecialType_Stone:
{ {
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_StandarsBox: case ObjectSpecialType_StandardBox:
{ {
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_RedExplosiveBox: case ObjectSpecialType_RedExplosiveBox:
{ {
int dmg = 50; int dmg = 50;
//gameObj = new ExplosiveBox(rigidBody, ObjectSpecialType_RedExplosiveBox); //gameObj = new ExplosiveBox(rigidBody, ObjectSpecialType_RedExplosiveBox);
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
//case ObjectSpecialType_BlueExplosiveBox: //case ObjectSpecialType_BlueExplosiveBox:
@ -69,24 +69,24 @@ Object* Level::createGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
// break; // break;
case ObjectSpecialType_SpikeBox: case ObjectSpecialType_SpikeBox:
{ {
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_Spike: case ObjectSpecialType_Spike:
{ {
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_CrystalFormation: case ObjectSpecialType_CrystalFormation:
{ {
int dmg = 50; int dmg = 50;
//gameObj = new Crystal(rigidBody); //gameObj = new Crystal(rigidBody);
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_CrystalShard: case ObjectSpecialType_CrystalShard:
{ {
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_JumpPad: case ObjectSpecialType_JumpPad:
@ -94,33 +94,33 @@ Object* Level::createGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
float power = ((JumpPadAttributes*)obj)->power; float power = ((JumpPadAttributes*)obj)->power;
Oyster::Math::Float3 dir = ((JumpPadAttributes*)obj)->direction; Oyster::Math::Float3 dir = ((JumpPadAttributes*)obj)->direction;
//gameObj = JumpPad(rigidBody, ); //gameObj = JumpPad(rigidBody, );
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_Portal: case ObjectSpecialType_Portal:
{ {
Oyster::Math::Float3 destination = ((PortalAttributes*)obj)->destination; Oyster::Math::Float3 destination = ((PortalAttributes*)obj)->destination;
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_SpawnPoint: case ObjectSpecialType_SpawnPoint:
{ {
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_Player: case ObjectSpecialType_Player:
{ {
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
case ObjectSpecialType_Generic: case ObjectSpecialType_Generic:
{ {
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
default: default:
{ {
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID); gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
} }
break; break;
} }

View File

@ -9,6 +9,7 @@ Portal::Portal(void)
this->portalExit = Float3(0,0,0); this->portalExit = Float3(0,0,0);
} }
Portal::Portal(Oyster::Physics::ICustomBody *rigidBody, void (*EventOnCollision)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), ObjectSpecialType type,int objectID ,Oyster::Math::Float3 portalExit) Portal::Portal(Oyster::Physics::ICustomBody *rigidBody, void (*EventOnCollision)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), ObjectSpecialType type,int objectID ,Oyster::Math::Float3 portalExit)
:StaticObject(rigidBody, EventOnCollision, type, objectID) :StaticObject(rigidBody, EventOnCollision, type, objectID)
{ {