void OnTriggerEnter(Collider col) { if (col.gameObject != DamageAuthor) { ILivingCharacter character = col.gameObject.GetComponent <ILivingCharacter>(); if (character != null) { character.Damage(damage); } GameManager.Instance.projectilePool.Despawn(transform); } }
void OnTriggerEnter(Collider col) { if (!IsAlive) { return; } if (col.gameObject.CompareTag("Player")) { ILivingCharacter character = col.gameObject.GetComponent <ILivingCharacter>(); if (character != null) { character.Damage(damage); } } }