Browse Source

Fixed for Unity 5.0

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

8
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,9 +82,10 @@ namespace Fungus
if (flowchart.luaBindingName != "")
{
Table globals = luaEnvironment.Interpreter.Globals;
Debug.Assert(globals != null);
globals[flowchart.luaBindingName] = flowchart;
if (globals != null)
{
globals[flowchart.luaBindingName] = flowchart;
}
}
// Always initialise when playing in the editor.

2991
Assets/Tests/Narrative/NarrativeTests.unity

File diff suppressed because it is too large Load Diff

10
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");
}
@ -44,7 +45,7 @@ public class OverlapTests : MonoBehaviour
{
IntegrationTest.Fail("Character image not active");
}
if (sayDialog_LeftImage.characterImage.transform.position.x > sayDialog_LeftImage.storyText.transform.position.x)
{
IntegrationTest.Fail("Character image not on left hand side");
@ -57,8 +58,9 @@ 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