protected override void DoTest()
 {
     if (FindObjectsOfType <BulletController>().Length == ExpectedNumber)
     {
         IntegrationTest.Pass(gameObject);
     }
     else
     {
         IntegrationTest.Fail(gameObject);
     }
 }
Exemplo n.º 2
0
 protected override void DoTest()
 {
     if (FindObjectOfType <Player>() != null)
     {
         IntegrationTest.Pass(gameObject);
     }
     else
     {
         IntegrationTest.Fail(gameObject);
     }
 }
Exemplo n.º 3
0
        protected override void DoTest()
        {
            byte[,] thisMap = TestMapGeneration.StringToMap(MapToCompare);
            if (GameData.Map == null || GameData.Map.GetLength(0) != thisMap.GetLength(0) ||
                GameData.Map.GetLength(1) != thisMap.GetLength(1))
            {
                IntegrationTest.Fail(gameObject);
            }

            for (int y = 0; y < thisMap.GetLength(1); y++)
            {
                for (int x = 0; x < thisMap.GetLength(0); x++)
                {
                    if (thisMap[x, y] != GameData.Map[x, y])
                    {
                        IntegrationTest.Fail(gameObject, string.Format("gameData[{0},{1}] = {2}", x, y, thisMap[x, y]));
                    }
                }
            }
            IntegrationTest.Pass(gameObject);
        }