Example #1
0
    string GetName(ObjectiveData.Element element, ObjectiveData.Reference reference, int magnitude)
    {
        string refe;

        if (reference == ObjectiveData.Reference.SingleGame)
        {
            refe = "una sola partida.";
        }
        else
        {
            refe = "totes les partides.";
        }

        switch (element)
        {
        case ObjectiveData.Element.Games:
            return("Juga " + magnitude.ToString() + " partides.");

        case ObjectiveData.Element.Days:
            return("Juga " + magnitude.ToString() + " dies diferents.");

        case ObjectiveData.Element.Score:
            return("Aconsegueix " + magnitude.ToString() + " punts en " + refe);

        case ObjectiveData.Element.Teeth:
            return("Aconsegueix " + magnitude.ToString() + " dents en " + refe);

        case ObjectiveData.Element.KilledFish:
            return("Aconsegueix refusar " + magnitude.ToString() + " peixos en " + refe);

        default:
            return("error");
        }
    }
Example #2
0
    int GetActual(ObjectiveData.Element element, ObjectiveData.Reference reference)
    {
        switch (element)
        {
        case ObjectiveData.Element.Games:
            return(DataManager.instance.GetTotalGamesUserSession());

        case ObjectiveData.Element.Days:
            return(DataManager.instance.GetTotalDaysUserSession());

        case ObjectiveData.Element.Score:
            if (reference == ObjectiveData.Reference.SingleGame)
            {
                return(DataManager.instance.GetMaxScoreSession());
            }
            else
            {
                return(DataManager.instance.GetTotalScoreSession());
            }

        case ObjectiveData.Element.Teeth:
            if (reference == ObjectiveData.Reference.SingleGame)
            {
                return(DataManager.instance.GetMaxTeethSession());
            }
            else
            {
                return(DataManager.instance.GetTotalTeethSession());
            }

        case ObjectiveData.Element.KilledFish:
            if (reference == ObjectiveData.Reference.SingleGame)
            {
                return(DataManager.instance.GetMaxKilledFishSession());
            }
            else
            {
                return(DataManager.instance.GetTotalKilledFishSession());
            }

        default:
            return(0);
        }
    }