Пример #1
0
        //Picke Upable Object. When we double click on the object in the scene.
        private void OnMouseDown()
        {
            if (!clickManager.DoubleClick())
            {
                return;
            }

            if (!isInit)
            {
                FetchItemInfo();
            }

            //Find Player and Players inventory
            TargetLE    lplayer   = FindObjectOfType <TargetLE>();
            LEInventory inventory = lplayer.transform.GetComponentInChildren <LEInventory>();

            inventory.AddItem(item);
            transform.parent.parent = inventory.transform;
            transform.parent.gameObject.SetActive(false);
            CursorManager.GetInstance().setMouse();
        }
Пример #2
0
 private void OnDestroy()
 {
     CursorManager.GetInstance().setMouse();
 }
Пример #3
0
 void OnMouseExit()
 {
     CursorManager.GetInstance().setMouse();
 }