void OnCollisionEnter(Collision collision) { string tag = collision.gameObject.tag; if (tag == "Enemy") { collision.gameObject.GetComponentInParent <EnemyHealthManager>().DamageEnemy(damage, collision); } else if (tag == "Player") { collision.gameObject.GetComponentInParent <FPSController>().DamagePlayer(damage); ObjectUtils.AddShotHit(); } else if (tag == "Shield") { // collision.gameObject.GetComponent<DomeShield>().BlockHit(damage); // ObjectUtils.AddShotHit(); } else if (tag == "BulletEnemy" && transform.gameObject.tag == "BulletEnemy") { ObjectUtils.SubtractBulletCollision(); } Deactivate(); }