Пример #1
0
        public IEnumerator _11RangedEnemyProjectileHasCorrectLocalScaleRight()
        {
            necromancerObject = Spawner.SpawnNecromancer(0, 0.3f);
            necromancer       = necromancerObject.GetComponent <RangedEnemyController>();
            yield return(null);

            necromancer.FireProjectile();
            yield return(null);

            var necromancerProjectile = GameObject.Find("NecromancerProjectile(Clone)");

            Assert.AreEqual(necromancerProjectile.transform.localScale.x, necromancerObject.transform.localScale.x);
        }
Пример #2
0
        public IEnumerator _10RangedEnemyShootProjectile()
        {
            necromancerObject = Spawner.SpawnNecromancer(0, 0.5f);
            necromancer       = necromancerObject.GetComponent <RangedEnemyController>();
            yield return(null);

            necromancer.FireProjectile();
            yield return(null);

            var necromancerProjectile = GameObject.Find("NecromancerProjectile(Clone)");

            Assert.IsNotNull(necromancerProjectile);
        }
Пример #3
0
        public IEnumerator _13RangedEnemyProjectileDisappearsWhenFar()
        {
            necromancerObject = Spawner.SpawnNecromancer(0, 0.5f);
            necromancer       = necromancerObject.GetComponent <RangedEnemyController>();
            yield return(null);

            necromancer.FireProjectile();
            yield return(null);

            var necromancerProjectile = GameObject.Find("NecromancerProjectile(Clone)");

            Assert.IsNotNull(necromancerProjectile);

            necromancerProjectile.transform.position = new Vector3(101, 0, 0);
            yield return(null);                                              //for update() to run

            Assert.IsTrue(necromancerProjectile == null);
        }