Browse Source

Fixed for Unity 5.0

master
Christopher 8 years ago
parent
commit
9c967aaf84
  1. 6
      Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs
  2. 2919
      Assets/Tests/Narrative/NarrativeTests.unity
  3. 6
      Assets/Tests/Narrative/OverlapTests.cs

6
Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs

@ -62,7 +62,6 @@ namespace Fungus
friendlyName = gameObject.name + "." + parentBlock.blockName + "." + "ExecuteLua #" + commandIndex.ToString();
Flowchart flowchart = GetFlowchart();
Debug.Assert(flowchart != null);
// See if a Lua Environment has been assigned to this Flowchart
if (luaEnvironment == null)
@ -83,10 +82,11 @@ namespace Fungus
if (flowchart.luaBindingName != "")
{
Table globals = luaEnvironment.Interpreter.Globals;
Debug.Assert(globals != null);
if (globals != null)
{
globals[flowchart.luaBindingName] = flowchart;
}
}
// Always initialise when playing in the editor.
// Allows the user to edit the Lua script while the game is playing.

2919
Assets/Tests/Narrative/NarrativeTests.unity

File diff suppressed because it is too large Load Diff

6
Assets/Tests/Narrative/OverlapTests.cs

@ -32,7 +32,8 @@ public class OverlapTests : MonoBehaviour
IntegrationTest.Fail("Character image should not be active");
}
if (sayDialog_RightImage.storyText.rectTransform.rect.width != 1531)
float width = sayDialog_RightImage.storyText.rectTransform.rect.width;
if (!Mathf.Approximately(width, 1439))
{
IntegrationTest.Fail("Story text width not correct");
}
@ -58,7 +59,8 @@ public class OverlapTests : MonoBehaviour
IntegrationTest.Fail("Character image should not be active");
}
if (sayDialog_LeftImage.storyText.rectTransform.rect.width != 1531)
float width = sayDialog_LeftImage.storyText.rectTransform.rect.width;
if (!Mathf.Approximately(width, 1439))
{
IntegrationTest.Fail("Story text width not correct");
}

Loading…
Cancel
Save