コード例 #1
0
    // generate the Dimensions sprites depending on what dimensions the skills in this
    // Opportunity apply to.
    protected void generateDimensionSprites(Opportunity opportunity)
    {
        Experience oppExperience = opportunity.EXP();
        float dimensionXLoc = .2f;
        int value = 0;

        oppExperience.totals.TryGetValue(((Dimension)0).GetDescription(), out value);
        if (value > 0)
        {
            generateDimensionObject(IASprite, dimensionXLoc);
            dimensionXLoc += .15f;
        }

        oppExperience.totals.TryGetValue(((Dimension)1).GetDescription(), out value);
        if (value > 0)
        {
            generateDimensionObject(GASprite, dimensionXLoc);
            dimensionXLoc += .15f;
        }

        oppExperience.totals.TryGetValue(((Dimension)2).GetDescription(), out value);
        if (value > 0)
        {
            generateDimensionObject(SCSprite, dimensionXLoc);
            dimensionXLoc += .15f;
        }

        oppExperience.totals.TryGetValue(((Dimension)3).GetDescription(), out value);
        if (value > 0)
        {
            generateDimensionObject(PPESprite, dimensionXLoc);
            dimensionXLoc += .15f;
        }

        oppExperience.totals.TryGetValue(((Dimension)4).GetDescription(), out value);
        if (value > 0)
        {
            generateDimensionObject(WBSprite, dimensionXLoc);
        }
    }