Browse Source

Merge pull request #521 from lealeelu/sync_saydialog

Sync active say dialog when Lua sets the say dialog
master
Chris Gregan 9 years ago committed by GitHub
parent
commit
7cbb0ef129
  1. 1
      Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt
  2. 9
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs

1
Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt vendored

@ -146,6 +146,7 @@ M.sayoptions.stopvoiceover = true
-- Set the active saydialog to use with the say function -- Set the active saydialog to use with the say function
function M.setsaydialog(saydialog) function M.setsaydialog(saydialog)
M.sayoptions.saydialog = saydialog M.sayoptions.saydialog = saydialog
luautils.SyncSayDialog(saydialog)
end end
-- Gets the active say dialog, or creates one if none exists yet -- Gets the active say dialog, or creates one if none exists yet

9
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs vendored

@ -480,6 +480,15 @@ namespace Fungus
{ {
return conversationManager.DoConversation(conv); return conversationManager.DoConversation(conv);
} }
/// <summary>
/// Sync the active say dialog with what Lua thinks the SayDialog should be
/// </summary>
/// <param name="sayDialog"></param>
public void SyncSayDialog(SayDialog sayDialog)
{
SayDialog.activeSayDialog = sayDialog;
}
} }
} }
Loading…
Cancel
Save