Turn "WrenScript" label into "mWrenScript" label, so it works on compilers other than MSVC

This commit is contained in:
Filip Homolka
2021-07-25 20:13:00 +02:00
parent 93e58db870
commit b391581feb
3 changed files with 13 additions and 13 deletions

View File

@@ -9,7 +9,7 @@ namespace Nuake {
std::string Script;
std::string Class;
Ref<WrenScript> WrenScript;
Ref<WrenScript> mWrenScript;
json Serialize()
{

View File

@@ -18,15 +18,15 @@ namespace Nuake {
WrenScriptComponent& wren = entities.get<WrenScriptComponent>(e);
if (wren.Script != "" && wren.Class != "")
{
wren.WrenScript = CreateRef<WrenScript>(wren.Script, wren.Class, true);
if (!wren.WrenScript->CompiledSuccesfully)
wren.mWrenScript = CreateRef<WrenScript>(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<WrenScriptComponent>(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<WrenScriptComponent>(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<WrenScriptComponent>(e);
if (wren.WrenScript != nullptr)
wren.WrenScript->CallExit();
if (wren.mWrenScript != nullptr)
wren.mWrenScript->CallExit();
}
ScriptingEngine::Close();

View File

@@ -117,7 +117,7 @@ namespace Nuake {
if (ent.HasComponent<WrenScriptComponent>())
{
wrenSetSlotHandle(vm, 0, ent.GetComponent<WrenScriptComponent>().WrenScript->m_Instance);
wrenSetSlotHandle(vm, 0, ent.GetComponent<WrenScriptComponent>().mWrenScript->m_Instance);
}
}