예제 #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();
 }
예제 #3
0
    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);
    }
예제 #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());
    }
예제 #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;
        }
        }
    }
예제 #7
0
 public Sprite GetItemSprite(eItemID ID)
 {
     return(ItemSpriteDic[ID]);
 }
예제 #8
0
 public ItemInfo GetItemInfo(eItemID ID)
 {
     return(ItemInfoDic[ID]);
 }
 public void SetInventoryList(eItemID TargetItemID)
 {
     InventoryItemIDs.Add(TargetItemID);
 }
예제 #10
0
 public GameObject GetItemPrefab(eItemID id)
 {
     return(ItemModels.Find(x => x.ID == id).Prefab);
 }
예제 #11
0
 public Sprite GetItemIcon(eItemID id)
 {
     return(ItemModels.Find(x => x.ID == id).Icon);
 }
예제 #12
0
 public static void ConvertItemIDToTileState(eItemID TargetItem)
 {
 }