Exemple #1
0
        private FmvClickableFacade CreateItem(ClickableModel itemModel, RectTransform parent)
        {
            FmvClickableFacade itemFacade = CreateItemFacade(parent);

            itemFacade.SetItemData(itemModel);
            return(itemFacade);
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        private void AddItemToInventory(ClickableModel model)
        {
            FmvClickableFacade itemFacade = CreateItem(model, inventoryElementsPanel);

            SetEventsForInventoryItem(itemFacade);

            allInventoryItems.Add(itemFacade);

            SetItemToIsInInventory(model);
        }
Exemple #4
0
 private void SetEventsForFindableItem(FmvClickableFacade itemFacade)
 {
     itemFacade.OnItemClicked.RemoveAllListeners();
     itemFacade.OnItemClicked.AddListener(ItemFromFindableToInventory);
     itemFacade.OnItemClicked.AddListener(TriggerPickUpNavigationTarget);
 }
Exemple #5
0
 private void SetEventsForInventoryItem(FmvClickableFacade itemFacade)
 {
     itemFacade.OnItemClicked.RemoveAllListeners();
     itemFacade.OnItemClicked.AddListener(ItemFromInventoryToUsed);
 }
Exemple #6
0
 private void SetFindableItemInactive(FmvClickableFacade itemFacade)
 {
     itemFacade.gameObject.SetActive(false);
 }
Exemple #7
0
 private void SetNavigationTargetInactive(FmvClickableFacade itemFacade)
 {
     itemFacade.gameObject.SetActive(false);
 }
Exemple #8
0
 private void SetEventsForNavigationTarget(FmvClickableFacade itemFacade)
 {
     itemFacade.OnItemClicked.RemoveAllListeners();
     itemFacade.OnItemClicked.AddListener(TriggerNavigationTarget);
 }