public void BuyAdventurer(GameObject panel) { PurchaseCheck check = new PurchaseCheck(); Adventurer adv = panel.GetComponent <MemberHirePanel>().adventurer; if (check.ableToPurchase(adv.price)) { //take the money away Player.instance.gold -= adv.price; //add adventurer adventurer.Add(adv); Destroy(panel); } }
public void upgradeMonster() { PurchaseCheck pc = new PurchaseCheck(); if (pc.ableToPurchase(monster.upgradePrice())) { if (monster.level < Player.instance.maxLevel) { Player.instance.gold -= monster.upgradePrice(); monster.level += 1; updateMonsterArea(); } } }
public void UpgradeAdventurer() { PurchaseCheck pc = new PurchaseCheck(); if (pc.ableToPurchase(adv.wealthCost())) { if (adv.wealth < Player.instance.maxLevel) { Debug.Log(adv.wealthCost()); Player.instance.gold -= adv.wealthCost(); adv.wealth += 1; setupPanel(); } } }
public void Upgrade() { PurchaseCheck check = new PurchaseCheck(); if (check.ableToPurchase(adventurer.wealthCost())) { if (adventurer.wealth <= Player.instance.maxLevel) { Player.instance.gold -= adventurer.wealthCost(); adventurer.wealth += 1; EnemyManager.instance.updateMemberListArea(); MemberPanel.instance.setupPanel(); MemberPanel.instance.DetailedMember(adventurer); } } }