2014-01-16 12:08:24 +01:00
|
|
|
#include "Game.h"
|
|
|
|
#include "Level.h"
|
|
|
|
|
|
|
|
using namespace GameLogic;
|
|
|
|
|
|
|
|
Game::LevelData::LevelData()
|
|
|
|
{
|
2014-01-20 15:47:52 +01:00
|
|
|
this->level = new Level();
|
2014-01-16 12:08:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Game::LevelData::~LevelData()
|
|
|
|
{
|
2014-01-20 15:47:52 +01:00
|
|
|
delete this->level;
|
|
|
|
this->level = 0;
|
|
|
|
}
|
|
|
|
|
2014-01-16 12:08:24 +01:00
|
|
|
|
2014-01-20 15:47:52 +01:00
|
|
|
Oyster::Math::Float3 Game::LevelData::GetPosition()
|
|
|
|
{
|
|
|
|
//return this->level->GetCenter();
|
|
|
|
return Oyster::Math::Float3();
|
|
|
|
}
|
2014-02-11 13:03:37 +01:00
|
|
|
Oyster::Math::Quaternion Game::LevelData::GetRotation()
|
|
|
|
{
|
|
|
|
return Oyster::Math::Quaternion();
|
|
|
|
}
|
|
|
|
Oyster::Math::Float3 Game::LevelData::GetScale()
|
|
|
|
{
|
|
|
|
return Oyster::Math::Float3();
|
|
|
|
}
|
2014-01-20 15:47:52 +01:00
|
|
|
Oyster::Math::Float4x4 Game::LevelData::GetOrientation()
|
|
|
|
{
|
|
|
|
//return this->level->GetOrientation();
|
|
|
|
return Oyster::Math::Float4x4();
|
|
|
|
}
|
2014-01-28 15:04:25 +01:00
|
|
|
|
2014-01-20 15:47:52 +01:00
|
|
|
int Game::LevelData::GetID() const
|
|
|
|
{
|
2014-01-28 15:04:25 +01:00
|
|
|
return ((IObjectData*)this->level)->GetID();
|
2014-01-20 15:47:52 +01:00
|
|
|
}
|
2014-02-12 14:48:58 +01:00
|
|
|
ObjectSpecialType Game::LevelData::GetObjectType() const
|
2014-01-20 15:47:52 +01:00
|
|
|
{
|
2014-01-30 09:40:58 +01:00
|
|
|
return ((IObjectData*)this->level)->GetObjectType();
|
2014-01-28 15:04:25 +01:00
|
|
|
//return OBJECT_TYPE_UNKNOWN;
|
2014-01-20 15:47:52 +01:00
|
|
|
}
|
2014-02-05 11:46:04 +01:00
|
|
|
int Game::LevelData::getNrOfDynamicObj()const
|
|
|
|
{
|
|
|
|
return this->level->getNrOfDynamicObj();
|
|
|
|
}
|
2014-01-28 15:04:25 +01:00
|
|
|
IObjectData* Game::LevelData::GetObjectAt(int ID) const
|
|
|
|
{
|
|
|
|
return this->level->GetObj(ID);
|
2014-02-18 11:33:36 +01:00
|
|
|
}
|
|
|
|
|
2014-02-18 11:44:02 +01:00
|
|
|
void Game::LevelData::GetAllDynamicObjects(Utility::DynamicMemory::DynamicArray<IObjectData*>& mem) const
|
2014-02-18 11:33:36 +01:00
|
|
|
{
|
|
|
|
for(int i = 0; i < level->dynamicObjects.Size(); i++)
|
|
|
|
{
|
2014-02-18 11:44:02 +01:00
|
|
|
mem[i] = level->dynamicObjects[i];
|
2014-02-18 11:33:36 +01:00
|
|
|
}
|
2014-01-28 15:04:25 +01:00
|
|
|
}
|