Exemple #1
0
        IEnumerator DelayUse()
        {
            CameraControls.Instance.SetParamaters(CameraControls.CameraSetup.CANNON);
            CameraControls.Instance.MatchTransform(playerPosition, adjustX, true);

            yield return(null);

            Debug.Log("Use");

            Using = true;
            InteractionInfo[] info = new InteractionInfo[] { };
            interaction.SetInteractions(info);
            InteractionManager.Instance.ClearInteraction();

            stored = Inventory.Instance.GetStoredFromItem(itemNeeded);

            if (!Loaded)
            {
                if (stored != null)
                {
                    if (stored.amount > 0)
                    {
                        InteractionManager.Instance.ShowBottomText(true);
                        InteractionManager.Instance.SetBottomText(loadInteraction.GetInteractionMsg());
                    }
                }
            }
            else
            {
                if (stored != null)
                {
                    if (stored.amount < itemNeeded.inventoryMax)
                    {
                        InteractionManager.Instance.ShowBottomText(true);
                        InteractionManager.Instance.SetBottomText(unloadInteraction.GetInteractionMsg());
                    }
                }
            }
        }
Exemple #2
0
 public void Clear()
 {
     stored = null;
     slotUI.SetActive(false);
 }
Exemple #3
0
 public void Populate(StoredItem item)
 {
     slotUI.SetActive(true);
     stored = item;
     UpdateUI();
 }