public void EnemyMovementLogic_shouldNotDamageIfNotPlayer()
        {
            bool isDying      = false;
            bool shouldDamage = EnemyMovementLogic.shouldDamageHappen("NotShadowTed", "NotPlayer", isDying);

            Assert.AreEqual(shouldDamage, false);
        }
Esempio n. 2
0
 /// <summary>
 /// CollisionEnter is used to determine if the Enemy is Hurting Ted
 /// </summary>
 /// <param name="other">The Collision2D data associated with this collision.</param>
 void OnCollisionEnter2D(Collision2D other)
 {
     if (EnemyMovementLogic.shouldDamageHappen(this.tag, other.gameObject.tag, isDying))
     {
         FindObjectOfType <GameManager>().takeDamage(1);
         soundManager.PlaySound("ouch");
         other.gameObject.GetComponent <Animator>().SetTrigger("ouch");
     }
 }