Esempio n. 1
0
    private void attemptToPlaceDefenderAt(Vector2 gridPos)
    {
        var CrownDisplay = FindObjectOfType <CrownDisplay>();
        int defendercost = defender.GetCrownCost();

        if (CrownDisplay.HaveEnoughCrowns(defendercost))
        {
            SpawnDefender(gridPos);
            CrownDisplay.SpendCrowns(defendercost);
        }
    }