#include "StaticMesh.hpp" #include "Core/CoreInstance.hpp" #include "Game/GameInstance.hpp" #include "Game/SaveMap/SaveMap.hpp" #include "Game/World/World.hpp" #include "../../../RenderEngine/UwURenderEngine.hpp" StaticMesh::StaticMesh() { SetType(Classes::StaticMesh); } std::shared_ptr StaticMesh::save() { return std::make_shared("StaticMesh")->connect_to(Mesh::save()); } void StaticMesh::load(std::shared_ptr save) { Mesh::load(save->getParent()); } void StaticMesh::load_model(const std::string& model_name) { model_name_ = model_name; model_ = GET_RENDER_ENGINE->GetModelManager()->LoadModel(model_name); SetModelName(model_name); } void StaticMesh::OnDestroy() { Mesh::OnDestroy(); GET_RENDER_ENGINE->GetModelManager()->FreeModel(model_name_); }