void OnTriggerEnter(Collider collider) { if (collider.gameObject.tag == "WindWalker") { healthScript.DamageHealth(enemyDmg); } if (collider.gameObject.tag == "Sage") { healthScript.DamageHealth(enemyDmg); } if (collider.gameObject.tag == "Warrior") { healthScript.DamageHealth(enemyDmg); } if (collider.gameObject.tag == "Ninja") { healthScript.DamageHealth(enemyDmg); } if (collider.gameObject.tag == "Projectile") { enemyHealth.DamageHealth(rangedPlayerDamage); Destroy(collider.gameObject); } }
void OnTriggerEnter(Collider collider) { if (collider.gameObject.tag == "WindWalker") { Debug.Log("Dealing damage"); healthScript.DamageHealth(damage); } if (collider.gameObject.tag == "Warrior") { Debug.Log("Dealing damage"); healthScript.DamageHealth(damage); } if (collider.gameObject.tag == "Ninja") { Debug.Log("Dealing damage"); healthScript.DamageHealth(damage); } if (collider.gameObject.tag == "Sage") { Debug.Log("Dealing damage"); healthScript.DamageHealth(damage); } }