added new model for crystal, not possible to move through crystals
This commit is contained in:
+13
-6
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user