Ejemplo n.º 1
0
    public GameObject GetPrefabByScore(FuzzyScore score)
    {
        if (score == null)
        {
            return(Normal);
        }
        GameObject retobj = null;

        switch (score.result)
        {
        case FuzzyResult.All:
            retobj = All;
            break;

        case FuzzyResult.Medium:
            retobj = Medium;
            break;

        case FuzzyResult.Few:
            retobj = Few;
            break;
        }
        if (retobj == null)
        {
            retobj = Normal;
        }
        return(retobj);
    }
Ejemplo n.º 2
0
    // Prepare Score member of POI, to keep fuzzy logic result on POI
    private FuzzyScore PrepareScore(double result, string sAction)
    {
        FuzzyScore score = new FuzzyScore();

        if (string.Compare(sAction, "All", true) == 0)
        {
            score.result = FuzzyResult.All;
        }
        else if (string.Compare(sAction, "Medium", true) == 0)
        {
            score.result = FuzzyResult.Medium;
        }
        else
        {
            score.result = FuzzyResult.Few;
        }
        score.score      = (float)result;
        score.lastupdate = DateTime.Now;
        return(score);
    }