Danbias/Code/Game/GameLogic/Level.cpp

43 lines
510 B
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"
2013-11-19 11:07:14 +01:00
using namespace GameLogic;
2013-12-05 11:50:39 +01:00
struct Level::PrivateData
{
PrivateData()
{
gameMode = new GameMode();
}
~PrivateData()
{
if (gameMode)
{
delete gameMode;
}
}
StaticObject** staticObjects;
int nrOfStaticObjects;
DynamicObject** dynamicObjects;
int nrOfDynamicObjects;
GameMode* gameMode;
}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
}