CharacterBehavior.OnTriggerExit2D C# (CSharp) Method

OnTriggerExit2D() public method

public OnTriggerExit2D ( Collider2D other ) : void
other UnityEngine.Collider2D
return void
    public virtual void OnTriggerExit2D(Collider2D other)
    {
        // If you exit a moving platform, detach from it
        if (other.gameObject.tag == "moving")
        {
            float xPos = transform.position.x;
            transform.SetParent(null);
            transform.position = new Vector3(xPos,transform.position.y,0.0f);
        }
        // If you exit the stage boundaries, DIE
        if (other.gameObject.tag == "DeathBoundary")
        {
            //OnDeath ();
            if (!CharacterBehavior.Dying){
                PlayerAnim.SetBool ("FallDeath", true);
                CharacterBehavior.Dying = true;
            }
        }
    }