Files
CrystalPoint/LevelObject.cpp
T
kennyboy55 95ab1879b4 Merge branch 'developer' into enemy
# Conflicts:
#	CrystalPoint.cpp
#	Entity.cpp
#	Player.cpp
#	Player.h
#	World.cpp
#	World.h
2016-06-03 11:30:19 +02:00

23 lines
487 B
C++

#include "LevelObject.h"
#include "Model.h"
LevelObject::LevelObject(const std::string &fileName, const Vec3f &position, const Vec3f &rotation, const float &scale, const bool &hasCollision)
{
model = Model::load(fileName);
this->position = position;
this->position.x -= model->center.x;
this->position.z -= model->center.z;
this->rotation = rotation;
this->scale = scale;
this->canCollide = hasCollision;
}
LevelObject::~LevelObject()
{
if (model)
Model::unload(model);
}