示例#1
0
    // void OnTriggerStay2Dx(Collider2D collider){
    //     if (collider.gameObject.tag == "Player" && pC2D.getTempTarget() != gameObject){
    //         pC2D.targetSetter(gameObject);
    //     }
    // }

    void OnTriggerExit2D(Collider2D collider)
    {
        if (collider.gameObject.tag == "Player")
        {
            if (pC2D.getTempTarget() == gameObject)
            {
                pC2D.targetSetter(null);
            }
        }
    }