public void ClickBuy() { if (PlayerParty.gold < 25) { NotificationPopupSystem.PopupText("Not enough gold"); return; } PlayerParty.gold -= 25; // Instantiate the item and add it to player inventory. new Item(forSale); }
public void Enter() { if (PlayerParty.CountActivePartyMembers() > 0 && PlayerParty.CountActivePartyMembers() < 4) { SceneManager.LoadScene(Constants.SCENE_ARENA_COMBAT); } else { NotificationPopupSystem.PopupText("This combat requires you to have 1-3 active party members."); } }
public void RestParty() { if (PlayerParty.gold < 3) { NotificationPopupSystem.PopupText("Not enough gold"); return; } PlayerParty.gold -= 3; foreach (CharacterSheet c in PlayerParty.partyMembers) { c.Heal(10); } NotificationPopupSystem.PopupText("Each party member heals for 10."); }
public void Recruit() { if (PlayerParty.gold < 15) { NotificationPopupSystem.PopupText("Not enough gold"); return; } if (PlayerParty.partyMembers.Count >= Constants.MAX_PARTY_SIZE) { NotificationPopupSystem.PopupText("Party already full"); return; } PlayerParty.AddToParty(characterClass); PlayerParty.gold -= 15; PartyIndicator toUpdate = (PartyIndicator)FindObjectOfType(typeof(PartyIndicator)); toUpdate.PartyCompositionChanged(); }