示例#1
0
 void InitTarget_Default()
 {
     if (DefaultLETarget_PF != null)
     {
         TargetLE   target      = Instantiate <TargetLE>(DefaultLETarget_PF);
         GameObject targetLEObj = target.gameObject;
     }
 }
示例#2
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();
        }
示例#3
0
 // Use this for initialization
 private void OnEnable()
 {
     allHandles = GetComponentsInChildren <ItemHandleOnGUI>();
     player     = FindObjectOfType <TargetLE>();
 }