Exemplo n.º 1
0
    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);
        }
    }
Exemplo n.º 2
0
    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();
            }
        }
    }
Exemplo n.º 3
0
    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();
            }
        }
    }
Exemplo n.º 4
0
    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);
            }
        }
    }