Esempio n. 1
0
    void OnTriggerEnter(Collider other)
    {
        //        if (other.gameObject.tag == "Door")
        //            Debug.Log("TriggeEnter with" + other.gameObject);
        //
        //        if (other.gameObject.tag == "PickUp")
        //            Debug.Log("TriggeEnter with" + other.gameObject);
        //
        //        if (other.gameObject.tag == "Light")
        //            Debug.Log("TriggeEnter with" + other.gameObject);


        if (other.gameObject.tag == "Door" || other.gameObject.tag == "PickUp" || other.gameObject.tag == "Light" || other.gameObject.tag == "Electronic" || other.gameObject.tag == "Drawer" || other.gameObject.tag == "Test-RFID" || other.gameObject.tag == "Test-UI")
        {
            if (walkedOver == null)
            {
                if (pickUpScript != null)
                {
                    pickUpScript.AddWalkedOverObject(other.gameObject, other.tag);
                    walkedOver = other.gameObject;
                }

                else
                {
                    initPickUpScript();
                }
            }
        }
    }