public static void Deserialize(RoleDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

            while (-1 != (tag = reader.ReadTag()))
            {
                switch (tag)
                {
                case 0x10000:
                {
                    ins.ID = reader.ReadInt32();
                }
                break;

                case 0x60001:
                {
                    ins.Name = reader.ReadString();
                }
                break;

                case 0x60002:
                {
                    ins.NormalDrawing = reader.ReadString();
                }
                break;
                }
            }
        }
 // 窗口刷新消息
 public void OnRefreshContent(string content, int iRoleID)
 {
     table.Config     kConfig    = TabtoyConfigManager.GetConfig();
     table.RoleDefine roleconfig = kConfig.GetRoleByID(iRoleID);
     GetText("Text").text        = content;
     GetImage("roleback").sprite = Resources.Load(roleconfig.NormalDrawing, typeof(Sprite)) as Sprite;
 }
        public RoleDefine GetRoleByID(int ID, RoleDefine def = default(RoleDefine))
        {
            RoleDefine ret;

            if (_RoleByID.TryGetValue(ID, out ret))
            {
                return(ret);
            }

            if (def == default(RoleDefine))
            {
                TableLogger.ErrorLine("GetRoleByID failed, ID: {0}", ID);
            }

            return(def);
        }