LevelObject.cpp 411 B

1234567891011121314151617181920
  1. #include "LevelObject.h"
  2. #include "Model.h"
  3. LevelObject::LevelObject(const std::string &fileName, const Vec3f &position, const Vec3f &rotation, const float &scale, const bool &hasCollision)
  4. {
  5. model = Model::load(fileName);
  6. this->position = position;
  7. this->rotation = rotation;
  8. this->scale = scale;
  9. this->canCollide = hasCollision;
  10. }
  11. LevelObject::~LevelObject()
  12. {
  13. if (model)
  14. Model::unload(model);
  15. }