2013-11-19 11:07:14 +01:00
|
|
|
#include "Level.h"
|
2014-01-20 15:47:52 +01:00
|
|
|
#include "CollisionManager.h"
|
2013-11-19 11:07:14 +01:00
|
|
|
|
|
|
|
using namespace GameLogic;
|
2014-01-14 10:28:12 +01:00
|
|
|
using namespace Utility::DynamicMemory;
|
2014-01-16 11:40:29 +01:00
|
|
|
using namespace Oyster::Physics;
|
2013-11-19 11:07:14 +01:00
|
|
|
|
2013-12-05 11:50:39 +01:00
|
|
|
|
2013-11-19 11:07:14 +01:00
|
|
|
Level::Level(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
Level::~Level(void)
|
|
|
|
{
|
|
|
|
}
|
2013-12-12 09:36:14 +01:00
|
|
|
|
2013-12-13 11:06:03 +01:00
|
|
|
void Level::InitiateLevel(std::string levelPath)
|
|
|
|
{
|
|
|
|
|
2014-01-16 11:40:29 +01:00
|
|
|
}
|
|
|
|
void Level::InitiateLevel(float radius)
|
|
|
|
{
|
2014-01-20 15:47:52 +01:00
|
|
|
//API::SphericalBodyDescription sbDesc;
|
|
|
|
//sbDesc.centerPosition = Oyster::Math::Float4(0,0,0,1);
|
|
|
|
//sbDesc.ignoreGravity = true;
|
|
|
|
//sbDesc.radius = radius;
|
|
|
|
//sbDesc.mass = 1e16f; //10^16
|
|
|
|
//sbDesc.mass = 0; //10^16
|
|
|
|
//sbDesc.subscription_onCollision = CollisionManager::LevelCollision;
|
|
|
|
//
|
|
|
|
//ICustomBody* rigidBody = API::Instance().CreateRigidBody(sbDesc).Release();
|
|
|
|
//API::Instance().AddObject(rigidBody);
|
|
|
|
|
|
|
|
//API::Gravity gravityWell;
|
|
|
|
//
|
|
|
|
//gravityWell.gravityType = API::Gravity::GravityType_Well;
|
|
|
|
//gravityWell.well.mass = 1e16f;
|
|
|
|
//gravityWell.well.position = Oyster::Math::Float4(0,0,0,1);
|
|
|
|
//
|
|
|
|
//API::Instance().AddGravity(gravityWell);
|
2014-01-16 11:40:29 +01:00
|
|
|
|
2013-12-13 11:06:03 +01:00
|
|
|
}
|
|
|
|
|
2013-12-18 08:30:58 +01:00
|
|
|
void Level::AddPlayerToTeam(Player *player, int teamID)
|
|
|
|
{
|
2014-01-20 15:47:52 +01:00
|
|
|
this->teamManager.AddPlayerToTeam(player,teamID);
|
2013-12-18 08:30:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void Level::CreateTeam(int teamSize)
|
|
|
|
{
|
2014-01-20 15:47:52 +01:00
|
|
|
this->teamManager.CreateTeam(teamSize);
|
2013-12-18 08:30:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void Level::RespawnPlayer(Player *player)
|
|
|
|
{
|
2014-01-20 15:47:52 +01:00
|
|
|
this->teamManager.RespawnPlayerRandom(player);
|
2013-12-18 08:30:58 +01:00
|
|
|
}
|
|
|
|
|
2013-12-12 09:36:14 +01:00
|
|
|
|