Skip to content

Commit

Permalink
1.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsankamrani committed Jun 20, 2021
1 parent 503c472 commit 84b4e63
Show file tree
Hide file tree
Showing 51 changed files with 2,880 additions and 630 deletions.
Binary file modified editor/VandaEngine1.v12.suo
Binary file not shown.
6 changes: 3 additions & 3 deletions editor/VandaEngine1/Assets/Engine/Scripts/Prefab.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ function Update()

end

function OnTriggerEnter()
function OnTriggerEnter(otherActorName)

end

function OnTriggerStay()
function OnTriggerStay(otherActorName)

end

function OnTriggerExit()
function OnTriggerExit(otherActorName)

end

Expand Down
6 changes: 3 additions & 3 deletions editor/VandaEngine1/Assets/Engine/Scripts/Trigger.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
function OnTriggerEnter()
function OnTriggerEnter(otherActorName)

end

function OnTriggerStay()
function OnTriggerStay(otherActorName)

end

function OnTriggerExit()
function OnTriggerExit(otherActorName)

end
Binary file not shown.
15 changes: 9 additions & 6 deletions editor/VandaEngine1/Common/Prefab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ CVoid CInstancePrefab::UpdateScript()
}
}

CVoid CInstancePrefab::OnTriggerEnterScript()
CVoid CInstancePrefab::OnTriggerEnterScript(CChar *otherActorName)
{
if (m_hasScript)
{
Expand All @@ -132,15 +132,16 @@ CVoid CInstancePrefab::OnTriggerEnterScript()
lua_getglobal(m_lua, "OnTriggerEnter");
if (lua_isfunction(m_lua, -1))
{
lua_pcall(m_lua, 0, 0, 0);
lua_pushstring(m_lua, otherActorName);
lua_pcall(m_lua, 1, 0, 0);
}

lua_settop(m_lua, 0);
}
}


CVoid CInstancePrefab::OnTriggerStayScript()
CVoid CInstancePrefab::OnTriggerStayScript(CChar *otherActorName)
{
if (m_hasScript)
{
Expand All @@ -149,14 +150,15 @@ CVoid CInstancePrefab::OnTriggerStayScript()
lua_getglobal(m_lua, "OnTriggerStay");
if (lua_isfunction(m_lua, -1))
{
lua_pcall(m_lua, 0, 0, 0);
lua_pushstring(m_lua, otherActorName);
lua_pcall(m_lua, 1, 0, 0);
}

lua_settop(m_lua, 0);
}
}

CVoid CInstancePrefab::OnTriggerExitScript()
CVoid CInstancePrefab::OnTriggerExitScript(CChar *otherActorName)
{
if (m_hasScript)
{
Expand All @@ -165,7 +167,8 @@ CVoid CInstancePrefab::OnTriggerExitScript()
lua_getglobal(m_lua, "OnTriggerExit");
if (lua_isfunction(m_lua, -1))
{
lua_pcall(m_lua, 0, 0, 0);
lua_pushstring(m_lua, otherActorName);
lua_pcall(m_lua, 1, 0, 0);
}

lua_settop(m_lua, 0);
Expand Down
7 changes: 3 additions & 4 deletions editor/VandaEngine1/Common/Prefab.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class CInstancePrefab
CBool m_isTransformable;
CBool m_isSelectable;
lua_State* m_lua;

public:
CVoid SetName(CChar* name);
CVoid SetNameIndex();
Expand Down Expand Up @@ -158,9 +157,9 @@ class CInstancePrefab
CVoid ResetLua();
CVoid InitScript();
CVoid UpdateScript();
CVoid OnTriggerEnterScript();
CVoid OnTriggerStayScript();
CVoid OnTriggerExitScript();
CVoid OnTriggerEnterScript(CChar *otherActorName);
CVoid OnTriggerStayScript(CChar *otherActorName);
CVoid OnTriggerExitScript(CChar *otherActorName);
CVoid OnSelectScript();
CBool GetHasScript() { return m_hasScript; }
CVoid SetHasScript(CBool set) { m_hasScript = set; }
Expand Down
4 changes: 2 additions & 2 deletions editor/VandaEngine1/EditProjectProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void CEditProjectProperties::OnOK()
}

CChar temp[256];
sprintf(temp, "%s%s%s%s%s", "Vanda Engine 1.7.3 (", newProjectName, " - ", m_currentVSceneNameWithoutDot, ")");
sprintf(temp, "%s%s%s%s%s", "Vanda Engine 1.7.4 (", newProjectName, " - ", m_currentVSceneNameWithoutDot, ")");
ex_pVandaEngine1Dlg->SetWindowTextA(temp);

//save changes to projects.dat
Expand Down Expand Up @@ -227,7 +227,7 @@ void CEditProjectProperties::OnOK()
}

CChar temp[256];
sprintf(temp, "%s%s%s%s%s", "Vanda Engine 1.7.3 (", newProject->m_name, " - ", m_currentVSceneNameWithoutDot, ")");
sprintf(temp, "%s%s%s%s%s", "Vanda Engine 1.7.4 (", newProject->m_name, " - ", m_currentVSceneNameWithoutDot, ")");
ex_pVandaEngine1Dlg->SetWindowTextA(temp);

//create new directory
Expand Down
Loading

0 comments on commit 84b4e63

Please sign in to comment.