Esempio n. 1
0
    //Float3DText名称
    //对应FloatTextType枚举值
    //private string[] FloatText3DPath = {
    //    "",
    //    "AttackDamageText",
    //    "AttackCritDamageText",
    //    "TreatText",
    //    "TreatCritText",
    //    "HurtDamageText",
    //    "HurtCritDamageText",
    //    "ExpText",
    //    "AttackMissText",
    //    "DodgeText"
    //};

    //Float2DText名称
    //对应FloatTextType枚举值
    //private string[] FloatText2DPath = {
    //    "",
    //    "AttackDamage2DText",
    //    "AttackCritDamage2DText",
    //    "Treat2DText",
    //    "TreatCrit2DText",
    //    "HurtDamage2DText",
    //    "HurtCritDamage2DText",
    //    "Exp2DText",
    //    "AttackMiss2DText",
    //    "Dodge2DText"
    //};

    private string GetDisplayByFloatTextType(FloatTextType type, string value = "")
    {
        //Match with bmfont
        string result = "";

        switch (type)
        {
        case FloatTextType.Attack:
        case FloatTextType.Hurt:
        case FloatTextType.Treat:
        case FloatTextType.TreatCrit:
            result = value;
            break;

        case FloatTextType.AttackCrit:
        case FloatTextType.HurtCrit:
            result = "~" + value;
            break;

        case FloatTextType.GetExp:
            result = "jy+" + value;
            break;

        case FloatTextType.Dodge:
            result = "sb";
            break;

        case FloatTextType.AttackMiss:
            result = "wmz";
            break;
        }
        return(result);
    }
Esempio n. 2
0
    /// <summary>
    /// 转换成可支持的类型;
    /// </summary>
    private FloatTextType ConvertType(/*需要定义*/)
    {
        FloatTextType value = FloatTextType.None;

        //转换FloatTextType
        return(value);
    }
Esempio n. 3
0
 public static void WriteFloatTextType(this PacketWriter writer, FloatTextType data)
 {
     writer.WriteByte((byte)data);
 }