示例#1
0
        private void CheckToUseItem()
        {
            if (inputContainer.ActiveItemUse)
            {
                ActiveItem item = CurrentItem;

                if (item == null)
                {
                    return;
                }

                if (Time.time - items[item] < item.Cooldown)
                {
                    return;
                }

                Instantiate(item.ActiveLogic, transform);

                items[item] = Time.time;
            }
        }
示例#2
0
 private void AddNewActiveItem(ActiveItem item)
 {
     items.Add(item, Mathf.NegativeInfinity);
 }