You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.4 KiB
64 lines
1.4 KiB
9 years ago
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using Fungus;
|
||
|
|
||
|
public class OverlapTests : MonoBehaviour
|
||
|
{
|
||
|
public SayDialog sayDialog_LeftImage;
|
||
|
public SayDialog sayDialog_RightImage;
|
||
|
|
||
|
public void Step1()
|
||
|
{
|
||
|
if (!sayDialog_RightImage.characterImage.IsActive())
|
||
|
{
|
||
|
IntegrationTest.Fail("Character image not active");
|
||
|
}
|
||
|
|
||
|
if (sayDialog_RightImage.characterImage.transform.position.x < sayDialog_RightImage.storyText.transform.position.x)
|
||
|
{
|
||
|
IntegrationTest.Fail("Character image not on right hand side");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void Step2()
|
||
|
{
|
||
|
if (sayDialog_RightImage.characterImage.IsActive())
|
||
|
{
|
||
|
IntegrationTest.Fail("Character image should not be active");
|
||
|
}
|
||
|
|
||
|
if (sayDialog_RightImage.storyText.rectTransform.rect.width != 1531)
|
||
|
{
|
||
|
IntegrationTest.Fail("Story text width not correct");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void Step3()
|
||
|
{
|
||
|
if (!sayDialog_LeftImage.characterImage.IsActive())
|
||
|
{
|
||
|
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");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void Step4()
|
||
|
{
|
||
|
if (sayDialog_LeftImage.characterImage.IsActive())
|
||
|
{
|
||
|
IntegrationTest.Fail("Character image should not be active");
|
||
|
}
|
||
|
|
||
|
if (sayDialog_LeftImage.storyText.rectTransform.rect.width != 1531)
|
||
|
{
|
||
|
IntegrationTest.Fail("Story text width not correct");
|
||
|
}
|
||
|
|
||
|
IntegrationTest.Pass();
|
||
|
}
|
||
|
}
|