picking up crystal(sphere)
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
#include "Crystal.h"
|
||||
#include "Model.h"
|
||||
|
||||
|
||||
Crystal::Crystal(const std::string &fileName, const Vec3f &position, Vec3f &rotation, const float &scale)
|
||||
{
|
||||
model = Model::load(fileName);
|
||||
this->position = position;
|
||||
this->rotation = rotation;
|
||||
this->scale = scale;
|
||||
this->canCollide = true;
|
||||
filled = true;
|
||||
}
|
||||
|
||||
|
||||
Crystal::~Crystal()
|
||||
{
|
||||
if (model)
|
||||
Model::unload(model);
|
||||
}
|
||||
|
||||
void Crystal::draw()
|
||||
{
|
||||
if (filled)
|
||||
Entity::draw();
|
||||
}
|
||||
Reference in New Issue
Block a user