示例#1
0
    public void BuyCharacter()
    {
        int currentPoints = PointsUtil.GetCurrentPoints();
        var country       = countries[PlayerSelectedIndex];

        if (currentPoints >= country.UnlockCost)
        {
            Debug.Log("COUNTRY BOUGHT");
            country.IsLocked = false;
            PointsUtil.AddPoints(-country.UnlockCost);

            PointsObject.UpdatePoints();
            RefreshSelection();
            CountryModel.OverwriteCountries(countries);
        }
        else
        {
            Debug.Log("NOT ENOUGH POINTS");
        }
    }