예제 #1
0
    IEnumerator PickUpItem(Item item)
    {
        if (item != null)
        {
            yield return(new WaitForSeconds(1.2f));

            InventoryInstance.InventoryChanged(item, true);
            GameObject itemDisplay = Instantiate(_itemDisplay, Vector3.zero, Quaternion.identity);
            itemDisplay.transform.parent = _itemsList.transform;
            itemDisplay.GetComponent <ItemDisplay>().MyItme         = item;
            itemDisplay.GetComponent <ItemDisplay>().DetailsDisplay = _itemDetails;
            if (InventoryInstance.inventory.Count < 2)
            {
                _itemDetails.UpdateItemDetailsOverlay(item.Properties.ItemName, item.Properties.Weight, item.Properties.Value, item.Properties.Description, item.Properties.Category.ToString());
            }
            Destroy(item.gameObject);
            animator.SetBool("Pickup", false);
        }
    }
예제 #2
0
 public void OnClick()
 {
     DetailsDisplay.UpdateItemDetailsOverlay(MyItme.Properties.ItemName, MyItme.Properties.Weight, MyItme.Properties.Value, MyItme.Properties.Description, MyItme.Properties.Category.ToString());
 }