示例#1
0
    bool destroying = false; //The portals are closed?

    void OnTriggerEnter(Collider coll)
    {
        if (coll.gameObject != obj_crossing && second_portal != null)
        {
            if (coll.tag == Tags.player)
            {
                controller.CrossingPortal(coll.gameObject, this, true); //Tell the controller to ignore the object for future collisions with the other portal
            }
            else
            {
                controller.CrossingPortal(coll.gameObject, this, false);
            }
        }
    }