Exemplo n.º 1
0
 /// <summary>
 /// Moves the "New Mine" button and updates the text
 /// </summary>
 /// <param name="minePos"></param>
 private void UpdateNewMineButton(Vector3 minePos)
 {
     newMineButton.transform.position = minePos - new Vector3(0, MINE_SPACING);
     newMineButton.SetText(
         "New Shaft\n"
         + StringFormatter.GetCurrencyString(newMineCost));
 }
Exemplo n.º 2
0
    /// <summary>
    /// Upgrades this area, improving the worker's attributes
    /// </summary>
    public void UpgradeArea()
    {
        foreach (AreaAttribute <decimal> item in AreaAttributes)
        {
            item.Value += item.GetUpgradeAmount();
        }

        int newWorkers = Workers.GetUpgradeAmount();

        CurrentUpgradeCost += UpgradeCostMethod();
        AddWorkers(newWorkers);

        AreaLevel++;

        upgradeButton.SetText(AreaLevel.ToString());
    }