Beispiel #1
0
    void Update()
    {
        // Get active object from ObjectManager, this is the object under the lazer pointer
        activeObject = this.GetComponent <ObjectManager>().isActive[1];

        // if browesing then idle UI should be at the wall and all Fruit screens should be in storage
        if (_StateManager.currentUserState == StateManager.UserState.browesing)
        {
            if (_ObjectState.CanGrabOffShelf(activeObject))
            {
                //idleUI.transform.position = uiStorage;
                //activeObject.GetComponent < IFruit > ().ScreenDisplay(inFront);
            }

            else
            {
                idleUI.transform.position = wall;

                if (IFruit.displayedScreenUI != null)
                {
                    IFruit.TurnScreenOff(uiStorage);
                }
            }
        }

        // if examining then the idle UI should be in storage and the Fruit screen of the held object should be displayed
        else if (_StateManager.currentUserState == StateManager.UserState.examining)
        {
            _ObjectManager.heldObject.GetComponent <IFruit>().ScreenDisplay(inFront, screenRotation);
            //idleUI.transform.position = uiStorage; // Enable to hide screen UI when examining a fruit
        }

        else if (_StateManager.currentUserState == StateManager.UserState.busy)
        {
        }
    }
Beispiel #2
0
 public void Clear()
 {
     //IFruit.TurnOn(idleUI, wall);
     IFruit.TurnScreenOff(uiStorage);
 }