added new model for crystal, not possible to move through crystals

This commit is contained in:
Remco
2016-06-09 12:07:27 +02:00
parent 1164501158
commit 1f3188376a
8 changed files with 4783 additions and 51 deletions
+13 -6
View File
@@ -2,17 +2,19 @@
#include "Model.h"
Crystal::Crystal(const std::string &fileName, const Vec3f &position, Vec3f &rotation, const float &scale)
Crystal::Crystal(const std::string & filled, const std::string & empty, const Vec3f & position, Vec3f & rotation, const float & scale)
{
model = Model::load(fileName);
this->filled = filled;
this->empty = empty;
model = Model::load(this->filled);
this->position = position;
this->rotation = rotation;
this->scale = scale;
this->canCollide = true;
filled = true;
isFilled = true;
}
Crystal::~Crystal()
{
if (model)
@@ -20,7 +22,12 @@ Crystal::~Crystal()
}
void Crystal::draw()
{
Entity::draw();
}
void Crystal::pickUp()
{
if (filled)
Entity::draw();
isFilled = false;
model = Model::load(empty);
}