Exemple #1
0
 // Goes through the entire party and heals them to the max
 public override void EventOutcome()
 {
     for (int i = 0; i < playerInventory.GetPartyInvetorySize(); i++)
     {
         InventoryParty currMember = playerInventory.GetInventoryCharacterAtIndex(i);
         currMember.CurrentHealthPoints = currMember.ReturnModdedStat("MaxHP");
         currMember.CurrentSkillPoints  = currMember.ReturnModdedStat("MaxSP");
         Debug.Log(currMember.SpecifiedCharacter.characterName + " healed to the max!");
     }
     GameManager.Instance.CurrentState = GameStates.NORMAL;
     isFinished = true;
 }
Exemple #2
0
        // Depending on what menu we are in, we update what is currently displayed after we scroll on something
        private void UpdateMenuContext()
        {
            switch (currentState)
            {
            case MenuStates.ITEM:
                // We update the item description
                if (currentSubMenuState == SubMenuStates.HIDDEN)
                {
                    if (currentMenuIndex < playerInventory.GetItemInventorySize())
                    {
                        itemMenuObject.transform.GetChild(2).GetComponentInChildren <TextMeshProUGUI>().text = playerInventory.GetItemAtIndex(currentMenuIndex).SpecifiedItem.itemDescription;
                    }
                }
                else if (currentSubMenuState == SubMenuStates.SUB1)
                {
                    InventoryParty currParty = playerInventory.GetInventoryCharacterAtIndex(currentMenuIndex);
                    itemMenuObject.transform.GetChild(2).GetComponentInChildren <TextMeshProUGUI>().text = "Select a target to use this on.";
                    itemMenuObject.transform.GetChild(3).GetComponentInChildren <TextMeshProUGUI>().text = "HP: " + currParty.CurrentHealthPoints + "/" + currParty.ReturnModdedStat("MaxHP") +
                                                                                                           "\nSP: " + currParty.CurrentSkillPoints + "/" + currParty.ReturnModdedStat("MaxSP");
                }
                break;

            case MenuStates.PARTY:
                // We update the party description
                if (currentMenuIndex < playerInventory.GetPartyInvetorySize())
                {
                    partyMenuObject.transform.GetChild(1).GetComponentInChildren <TextMeshProUGUI>().text = playerInventory.GetInventoryCharacterAtIndex(currentMenuIndex).SpecifiedCharacter.characterName;
                }
                break;

            case MenuStates.GEAR:
                // We update the gear description
                if (currentMenuIndex < playerInventory.GetGearInventorySize())
                {
                    gearMenuObject.transform.GetChild(1).GetComponentInChildren <TextMeshProUGUI>().text = playerInventory.GetGearAtIndex(currentMenuIndex).SpecifiedGear.gearDescription;
                }
                break;

            case MenuStates.LINK:
                // We update the link description
                if (currentMenuIndex < playerInventory.GetLinkInventorySize())
                {
                    linkMenuObject.transform.GetChild(1).GetComponentInChildren <TextMeshProUGUI>().text = playerInventory.GetLinkAtIndex(currentMenuIndex).SpecifiedLink.linkDescription;
                }
                break;
            }
        }