Esempio n. 1
0
 public void SetSlot(eItemID ID, int SlotIndex)
 {
     InventoryImage.color  = Color.white;
     InventoryImage.sprite = ItemInfoManager.Instance.GetItemSprite(ID);
     SettedItemID          = ID;
     button.enabled        = true;
     IndexNumber           = SlotIndex;
 }
 private void Func_RandomPotion()
 {
     for (int i = 0; i < 3; i++)
     {
         eItemID random = ItemInfoManager.Instance.GetRandomPotionID();
         InventoryController.Instance.SetInventoryList(random);
     }
     TurnManager.Instance.PlayerTurnStart();
 }
    public void InitItemView(eItemID id, ItemData itemData)
    {
        ID        = id;
        _itemData = itemData;

        _itemIDText.text = ID.ToString();
        _itemIcon.sprite = itemData.GetItemIcon(id);
        _itemPrefab      = itemData.GetItemPrefab(id);
    }
    public void PopUpItemExplanaition(eItemID ID)
    {
        ExplanationPanel.SetActive(true);

        ItemInfo m_TargetItem = ItemInfoManager.Instance.GetItemInfo(ID);

        Title.text        = m_TargetItem.ItemName;
        Explanation.text  = m_TargetItem.ItemExplanation;
        Mainsprite.sprite = ItemInfoManager.Instance.GetItemSprite(ID);

        NowButton = PotionItemButtons;
        PotionItemButtons.SetActive(true);
    }
Esempio n. 5
0
    public void SetFlask(int _DestinationX, int _DestinationY, eItemID _PotionID)
    {
        DestinationX = _DestinationX;
        DestinationY = _DestinationY;


        VoidCallBack TempCounter = CountTurn;

        TurnManager.Instance.PlayerUpdateLogicAndCount += TempCounter;

        PotionID          = _PotionID;
        MainSprite.sprite = ItemInfoManager.Instance.GetItemSprite((PotionID));
        StartCoroutine(ThrowFlask());
    }
Esempio n. 6
0
    public static void UseItem(int LocX, int LocY, eItemID TargetItem)
    {
        switch (TargetItem)
        {
        case eItemID.FireFlask:
        case eItemID.PoisonFlask:
        {
            GameObject NewFlask = GameObject.Instantiate(FlaskTemplate);

            NewFlask.GetComponent <FlaskManager>().SetFlask(LocX, LocY, TargetItem);
            break;
        }

        default:
        {
            break;
        }
        }
    }
 public Sprite GetItemSprite(eItemID ID)
 {
     return(ItemSpriteDic[ID]);
 }
 public ItemInfo GetItemInfo(eItemID ID)
 {
     return(ItemInfoDic[ID]);
 }
 public void SetInventoryList(eItemID TargetItemID)
 {
     InventoryItemIDs.Add(TargetItemID);
 }
Esempio n. 10
0
 public GameObject GetItemPrefab(eItemID id)
 {
     return(ItemModels.Find(x => x.ID == id).Prefab);
 }
Esempio n. 11
0
 public Sprite GetItemIcon(eItemID id)
 {
     return(ItemModels.Find(x => x.ID == id).Icon);
 }
Esempio n. 12
0
 public static void ConvertItemIDToTileState(eItemID TargetItem)
 {
 }