Exemplo n.º 1
0
 private void EnableItemDescription(BaseItemSellingSlot itemShopSlot)
 {
     if (itemShopSlot.ITEMSHOP != null)
     {
         SetItemDescription(itemShopSlot);
     }
 }
Exemplo n.º 2
0
    public void SellingItem(BaseItemSellingSlot itemSellingSlot)
    {
        string itemName    = itemSellingSlot.ITEMSHOP.ItemName;
        string title       = string.Format("การขาย {0} สำเร็จ", itemName);
        string description = string.Format("ได้รับ {0} บาท จากการขาย {1}", itemSellingSlot.ITEMSHOP.ItemPrice, itemName);
        Sprite icon        = itemSellingSlot.ITEMSHOP.ItemIcon;

        notificationUpdateGenerator.CreateTemplate(icon, title, description, hasSpriteColor);
    }
Exemplo n.º 3
0
    public void Selling(BaseItemSellingSlot baseItemSellingSlot)
    {
        int index = baseItemSellingSlot.ITEMSHOP.ItemSetIdIndex;

        if (!ReferenceEquals(_inventoryContainer.container_item_entry[index], null))
        {
            _characterStatusController.IncreaseCurrentMoney(baseItemSellingSlot.ITEMSHOP.ItemPrice);
            _inventoryContainer.SellingItem(index);
            baseItemSellingSlot.Selling();
            _notificationController.SellingItem(baseItemSellingSlot);
            CheckInvIsEmpty();
        }
    }
Exemplo n.º 4
0
    protected void SetItemDescription(BaseItemSellingSlot itemShopSlot)
    {
        item_description_gameobject.SetActive(true);

        item_name.text        = itemShopSlot.ITEMSHOP.ItemName;
        item_description.text = itemShopSlot.ITEMSHOP.ItemDescription;
        item_icon.sprite      = itemShopSlot.ITEMSHOP.ItemIcon;
        item_type.text        = itemShopSlot.ITEMSHOP.ItemType;

        if (itemShopSlot.ITEMSHOP.ItemProperties.Count > 0)
        {
            for (int i = 0; i < itemShopSlot.ITEMSHOP.ItemProperties.Count; i++)
            {
                ItemPropertyAmount itemproperty = itemShopSlot.ITEMSHOP.ItemProperties[i];
                itemPropertyGenerator.CreateTemplate(itemproperty);
            }
        }
        else
        {
            itemPropertyGenerator.ClearTemplate();
        }
    }
Exemplo n.º 5
0
 private void OnPointExitEventHandler(BaseItemSellingSlot itemShopSlot)
 {
     OnPointExitEvent?.Invoke(itemShopSlot);
 }
Exemplo n.º 6
0
 private void DisableItemDescription(BaseItemSellingSlot itemShopSlot)
 {
     Initializing();
 }
Exemplo n.º 7
0
 private void Awake()
 {
     _shopManager         = FindObjectOfType <ShopSellingManager>();
     _baseItemSellingSlot = gameObject.GetComponentInParent <BaseItemSellingSlot>();
 }