void OnTriggerExit(Collider col) { PlayerHitController playerHit = col.GetComponent <PlayerHitController> (); if (playerHit != null) { hitByPlayer = null; } }
void OnTriggerEnter(Collider col) { PlayerHitController playerHit = col.GetComponent <PlayerHitController> (); if (playerHit != null && playerHit.HitActivate) { hitByPlayer = playerHit.Player; playerHit.finishHit(); this.GetComponentInParent <HitColliderAction> ().hitAction(); } }