Browse Source

Fix portrait hide bug in Conversation Function

master
lealeelu 8 years ago committed by lealeelu
parent
commit
26e33808ec
  1. 13
      Assets/Fungus/Narrative/Scripts/ConversationManager.cs

13
Assets/Fungus/Narrative/Scripts/ConversationManager.cs

@ -76,12 +76,6 @@ namespace Fungus
{
ConversationItem item = conversationItems[i];
// Ignore Lua style comments and blank lines
if (item.Text.StartsWith("--") || item.Text.Trim() == "")
{
continue;
}
if (item.Character != null)
{
currentCharacter = item.Character;
@ -144,6 +138,7 @@ namespace Fungus
previousCharacter = currentCharacter;
if (!string.IsNullOrEmpty(item.Text)) {
exitSayWait = false;
sayDialog.Say(item.Text, true, true, true, false, null, () => {
exitSayWait = true;
@ -156,6 +151,7 @@ namespace Fungus
exitSayWait = false;
}
}
}
protected virtual List<ConversationItem> Parse(string conv)
{
@ -173,8 +169,9 @@ namespace Fungus
string sayParams = sayMatches[i].Groups["sayParams"].Value;
// As text and SayParams are both optional, an empty string will match the regex.
// We can ignore any matches were both are empty.
if (text.Length == 0 && sayParams.Length == 0)
// We can ignore any matches where both are empty
// or if they're Lua style comments
if ((text.Length == 0 && sayParams.Length == 0) || text.StartsWith("--"))
{
continue;
}

Loading…
Cancel
Save