예제 #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);
        }
    }
예제 #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();
            }
        }
    }
예제 #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();
            }
        }
    }
예제 #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);
            }
        }
    }