Crystal.cpp 424 B

1234567891011121314151617181920212223242526
  1. #include "Crystal.h"
  2. #include "Model.h"
  3. Crystal::Crystal(const std::string &fileName, const Vec3f &position, Vec3f &rotation, const float &scale)
  4. {
  5. model = Model::load(fileName);
  6. this->position = position;
  7. this->rotation = rotation;
  8. this->scale = scale;
  9. this->canCollide = true;
  10. filled = true;
  11. }
  12. Crystal::~Crystal()
  13. {
  14. if (model)
  15. Model::unload(model);
  16. }
  17. void Crystal::draw()
  18. {
  19. if (filled)
  20. Entity::draw();
  21. }