private FmvClickableFacade CreateItem(ClickableModel itemModel, RectTransform parent) { FmvClickableFacade itemFacade = CreateItemFacade(parent); itemFacade.SetItemData(itemModel); return(itemFacade); }
private void RemoveItemFromItemList(List <FmvClickableFacade> items, ClickableModel model) { FmvClickableFacade itemToRemove = items.Find((item) => item.name.Equals(model.Name)); if (itemToRemove && items.Remove(itemToRemove)) { Destroy(itemToRemove.gameObject); } }
private void AddItemToInventory(ClickableModel model) { FmvClickableFacade itemFacade = CreateItem(model, inventoryElementsPanel); SetEventsForInventoryItem(itemFacade); allInventoryItems.Add(itemFacade); SetItemToIsInInventory(model); }
private void SetEventsForFindableItem(FmvClickableFacade itemFacade) { itemFacade.OnItemClicked.RemoveAllListeners(); itemFacade.OnItemClicked.AddListener(ItemFromFindableToInventory); itemFacade.OnItemClicked.AddListener(TriggerPickUpNavigationTarget); }
private void SetEventsForInventoryItem(FmvClickableFacade itemFacade) { itemFacade.OnItemClicked.RemoveAllListeners(); itemFacade.OnItemClicked.AddListener(ItemFromInventoryToUsed); }
private void SetFindableItemInactive(FmvClickableFacade itemFacade) { itemFacade.gameObject.SetActive(false); }
private void SetNavigationTargetInactive(FmvClickableFacade itemFacade) { itemFacade.gameObject.SetActive(false); }
private void SetEventsForNavigationTarget(FmvClickableFacade itemFacade) { itemFacade.OnItemClicked.RemoveAllListeners(); itemFacade.OnItemClicked.AddListener(TriggerNavigationTarget); }