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