Example #1
0
    void OnTriggerExit(Collider col)
    {
        PlayerHitController playerHit = col.GetComponent <PlayerHitController> ();

        if (playerHit != null)
        {
            hitByPlayer = null;
        }
    }
Example #2
0
    void OnTriggerEnter(Collider col)
    {
        PlayerHitController playerHit = col.GetComponent <PlayerHitController> ();

        if (playerHit != null && playerHit.HitActivate)
        {
            hitByPlayer = playerHit.Player;
            playerHit.finishHit();

            this.GetComponentInParent <HitColliderAction> ().hitAction();
        }
    }