Fix model manager. It's version stable for model manager
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
#include "StaticMesh.hpp"
|
||||
|
||||
#include "Core/CoreInstance.hpp"
|
||||
#include "Core/RenderEngine/RenderEngine.hpp"
|
||||
#include "Game/GameInstance.hpp"
|
||||
#include "Log/Log.hpp"
|
||||
#include "Game/SaveMap/SaveMap.hpp"
|
||||
#include "Game/World/World.hpp"
|
||||
|
||||
StaticMesh::StaticMesh()
|
||||
{
|
||||
@@ -20,7 +24,13 @@ void StaticMesh::load(std::shared_ptr<SaveMap> save)
|
||||
|
||||
void StaticMesh::load_model(const std::string& model_name)
|
||||
{
|
||||
model_name_ = model_name;
|
||||
SetModelName(model_name);
|
||||
// TODO
|
||||
Message("Load mesh: " + model_name);
|
||||
model_ = GetWorld()->GetGameInstance().GetCore().GetRenderEngine()->GetActiveModelManager()->LoadModel(model_name);
|
||||
}
|
||||
|
||||
void StaticMesh::OnDestroy()
|
||||
{
|
||||
Mesh::OnDestroy();
|
||||
GetWorld()->GetGameInstance().GetCore().GetRenderEngine()->GetActiveModelManager()->FreeModel(model_name_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user