コード例 #1
0
ファイル: ArmManager.cs プロジェクト: svm92/RNG-Game
    public static string getArmDescription(Arm arm, ArmAspect armAspect)
    {
        string armAspectLetter = "";

        switch (armAspect)
        {
        case ArmAspect.NORMAL:
        default:
            armAspectLetter = "";
            break;

        case ArmAspect.SILVER:
            armAspectLetter = "_S";
            break;

        case ArmAspect.GOLD:
            armAspectLetter = "_G";
            break;
        }

        TextScript.Sentence armName = (TextScript.Sentence)
                                      System.Enum.Parse(typeof(TextScript.Sentence), "ARM" + (int)arm, true);

        TextScript.Sentence armDescription = (TextScript.Sentence)
                                             System.Enum.Parse(typeof(TextScript.Sentence), "ARM" + (int)arm + "_DESC" + armAspectLetter, true);

        return("<b>" + TextScript.get(armName) + "</b>\n\n" + TextScript.get(armDescription));
    }
コード例 #2
0
ファイル: CoreManager.cs プロジェクト: svm92/RNG-Game
    public static string getCoreDescription(Core core)
    {
        Sentence coreSentence     = (Sentence)System.Enum.Parse(typeof(Sentence), "CORE" + (int)core, true);
        Sentence coreDescSentence = (Sentence)System.Enum.Parse(typeof(Sentence), "CORE" + (int)core + "_DESC", true);

        return("<b>" + TextScript.get(coreSentence) + "</b>\n" + TextScript.get(coreDescSentence));
    }