示例#1
0
    public void DoAction(Crisis.actions action)
    {
        switch (action)
        {
        case Crisis.actions.expensive:
            if (money >= expensiveCost)
            {
                money -= expensiveCost;
                countryList[selectedCountry].DoAction(Crisis.actions.expensive);
            }
            break;

        case Crisis.actions.cheap:
            if (money >= cheapCost)
            {
                money -= cheapCost;
                countryList[selectedCountry].DoAction(Crisis.actions.cheap);
            }
            break;

        case Crisis.actions.nothing:
            countryList[selectedCountry].DoAction(Crisis.actions.nothing);
            break;
        }
    }
示例#2
0
    public void DoAction(Crisis.actions action)
    {
        switch (action)
        {
        case Crisis.actions.expensive:
            crisis.DoAction(Crisis.actions.expensive);
            break;

        case Crisis.actions.cheap:
            crisis.DoAction(Crisis.actions.cheap);
            break;

        case Crisis.actions.nothing:
            crisis.DoAction(Crisis.actions.nothing);
            break;
        }
    }