void OnParticleCollision(GameObject other) { /* * HP player = other.GetComponent<HP>(); * if (player != null) * { * player.TakeDamage(_damage, _myTrail); * } */ AIEnemy player = other.GetComponent <AIEnemy>(); if (player != null) { player.DeathByTrail(_damage); } }