diff --git a/Nuake/src/Scene/Components/WrenScriptComponent.h b/Nuake/src/Scene/Components/WrenScriptComponent.h index f7f027a8..f80155f7 100644 --- a/Nuake/src/Scene/Components/WrenScriptComponent.h +++ b/Nuake/src/Scene/Components/WrenScriptComponent.h @@ -9,7 +9,7 @@ namespace Nuake { std::string Script; std::string Class; - Ref WrenScript; + Ref mWrenScript; json Serialize() { diff --git a/Nuake/src/Scene/Systems/ScriptingSystem.cpp b/Nuake/src/Scene/Systems/ScriptingSystem.cpp index 639bf88d..c9e4690c 100644 --- a/Nuake/src/Scene/Systems/ScriptingSystem.cpp +++ b/Nuake/src/Scene/Systems/ScriptingSystem.cpp @@ -18,15 +18,15 @@ namespace Nuake { WrenScriptComponent& wren = entities.get(e); if (wren.Script != "" && wren.Class != "") { - wren.WrenScript = CreateRef(wren.Script, wren.Class, true); - if (!wren.WrenScript->CompiledSuccesfully) + wren.mWrenScript = CreateRef(wren.Script, wren.Class, true); + if (!wren.mWrenScript->CompiledSuccesfully) return false; } - if (wren.WrenScript != nullptr) + if (wren.mWrenScript != nullptr) { - wren.WrenScript->SetScriptableEntityID((int)e); - wren.WrenScript->CallInit(); + wren.mWrenScript->SetScriptableEntityID((int)e); + wren.mWrenScript->CallInit(); } } @@ -41,8 +41,8 @@ namespace Nuake { { WrenScriptComponent& wren = entities.get(e); - if (wren.WrenScript != nullptr) - wren.WrenScript->CallUpdate(ts); + if (wren.mWrenScript != nullptr) + wren.mWrenScript->CallUpdate(ts); } } @@ -54,8 +54,8 @@ namespace Nuake { { WrenScriptComponent& wren = entities.get(e); - if (wren.WrenScript != nullptr) - wren.WrenScript->CallFixedUpdate(ts); + if (wren.mWrenScript != nullptr) + wren.mWrenScript->CallFixedUpdate(ts); } } @@ -67,8 +67,8 @@ namespace Nuake { { WrenScriptComponent& wren = entities.get(e); - if (wren.WrenScript != nullptr) - wren.WrenScript->CallExit(); + if (wren.mWrenScript != nullptr) + wren.mWrenScript->CallExit(); } ScriptingEngine::Close(); diff --git a/Nuake/src/Scripting/Modules/SceneModule.h b/Nuake/src/Scripting/Modules/SceneModule.h index 91ff7394..5788e7b0 100644 --- a/Nuake/src/Scripting/Modules/SceneModule.h +++ b/Nuake/src/Scripting/Modules/SceneModule.h @@ -117,7 +117,7 @@ namespace Nuake { if (ent.HasComponent()) { - wrenSetSlotHandle(vm, 0, ent.GetComponent().WrenScript->m_Instance); + wrenSetSlotHandle(vm, 0, ent.GetComponent().mWrenScript->m_Instance); } }