Danbias/Code/Game/GameLogic/Level.cpp

68 lines
1.0 KiB
C++
Raw Normal View History

2013-11-19 11:07:14 +01:00
#include "Level.h"
2013-12-05 11:50:39 +01:00
#include "StaticObject.h"
#include "DynamicObject.h"
#include "GameMode.h"
#include "Player.h"
#include "PhysicsAPI.h"
#include "TeamManager.h"
#include "DynamicArray.h"
2013-11-19 11:07:14 +01:00
using namespace GameLogic;
using namespace Utility::DynamicMemory;
2013-11-19 11:07:14 +01:00
2013-12-05 11:50:39 +01:00
struct Level::PrivateData
{
PrivateData()
2013-12-05 11:50:39 +01:00
{
2013-12-05 11:50:39 +01:00
}
~PrivateData()
{
}
SmartPointer<TeamManager> teamManager;
2013-12-05 11:50:39 +01:00
DynamicArray<SmartPointer<StaticObject>> staticObjects;
DynamicArray<SmartPointer<DynamicObject>> dynamicObjects;
2013-12-05 11:50:39 +01:00
SmartPointer<GameMode> gameMode;
2013-12-05 11:50:39 +01:00
SmartPointer<Oyster::Physics::ICustomBody> rigidBodyLevel;
2013-12-05 11:50:39 +01:00
}myData;
2013-11-19 11:07:14 +01:00
Level::Level(void)
{
2013-12-05 11:50:39 +01:00
myData = new PrivateData();
2013-11-19 11:07:14 +01:00
}
Level::~Level(void)
{
2013-12-05 11:50:39 +01:00
delete myData;
2013-11-19 11:07:14 +01:00
}
void Level::InitiateLevel(std::string levelPath)
{
}
void Level::AddPlayerToTeam(Player *player, int teamID)
{
myData->teamManager->AddPlayerToTeam(player,teamID);
}
void Level::CreateTeam(int teamSize)
{
myData->teamManager->CreateTeam(teamSize);
}
void Level::RespawnPlayer(Player *player)
{
myData->teamManager->RespawnPlayerRandom(player);
}