Example #1
0
 public static MoleMole.MPStageData Deserialize(MoleMole.MPProtocol.MPStageData table, MoleMole.MPStageData obj)
 {
     if (obj == null)
     {
         obj = new MoleMole.MPStageData();
     }
     obj.stageName = table.StageName;
     return(obj);
 }
Example #2
0
        public static Offset <MoleMole.MPProtocol.MPStageData> Serialize(FlatBufferBuilder builder, MoleMole.MPStageData obj)
        {
            StringOffset stageNameOffset = new StringOffset();

            if (obj.stageName != null)
            {
                stageNameOffset = builder.CreateString(obj.stageName);
            }
            MoleMole.MPProtocol.MPStageData.StartMPStageData(builder);
            MoleMole.MPProtocol.MPStageData.AddStageName(builder, stageNameOffset);
            return(MoleMole.MPProtocol.MPStageData.EndMPStageData(builder));
        }
Example #3
0
 public static object DeserializeToObject(Table table, object obj)
 {
     if (table.GetType() == typeof(MoleMole.MPProtocol.MPStageData))
     {
         if (obj == null)
         {
             obj = new MoleMole.MPStageData();
         }
         return(Deserialize((MoleMole.MPProtocol.MPStageData)table, (MoleMole.MPStageData)obj));
     }
     if (table.GetType() == typeof(MoleMole.MPProtocol.MPAvatarDataItem))
     {
         if (obj == null)
         {
             obj = new MoleMole.MPAvatarDataItem();
         }
         return(Deserialize((MoleMole.MPProtocol.MPAvatarDataItem)table, (MoleMole.MPAvatarDataItem)obj));
     }
     if (table.GetType() == typeof(Packet_Event_EvtHittingOther))
     {
         if (obj == null)
         {
             obj = new EvtHittingOther();
         }
         return(Deserialize((Packet_Event_EvtHittingOther)table, (EvtHittingOther)obj));
     }
     if (table.GetType() == typeof(Packet_Event_EvtBeingHit))
     {
         if (obj == null)
         {
             obj = new EvtBeingHit();
         }
         return(Deserialize((Packet_Event_EvtBeingHit)table, (EvtBeingHit)obj));
     }
     if (table.GetType() == typeof(Packet_Event_EvtAttackLanded))
     {
         if (obj == null)
         {
             obj = new EvtAttackLanded();
         }
         return(Deserialize((Packet_Event_EvtAttackLanded)table, (EvtAttackLanded)obj));
     }
     if (table.GetType() == typeof(Packet_Event_EvtEvadeSuccess))
     {
         if (obj == null)
         {
             obj = new EvtEvadeSuccess();
         }
         return(Deserialize((Packet_Event_EvtEvadeSuccess)table, (EvtEvadeSuccess)obj));
     }
     if (table.GetType() == typeof(Packet_Event_EvtBulletHit))
     {
         if (obj == null)
         {
             obj = new EvtBulletHit();
         }
         return(Deserialize((Packet_Event_EvtBulletHit)table, (EvtBulletHit)obj));
     }
     if (table.GetType() == typeof(MPAttackData))
     {
         if (obj == null)
         {
             obj = new AttackData();
         }
         return(Deserialize((MPAttackData)table, (AttackData)obj));
     }
     if (table.GetType() == typeof(MPAttackResult))
     {
         if (obj == null)
         {
             obj = new AttackResult();
         }
         return(Deserialize((MPAttackResult)table, (AttackResult)obj));
     }
     if (table.GetType() != typeof(MPHitCollision))
     {
         return(obj);
     }
     if (obj == null)
     {
         obj = new AttackResult.HitCollsion();
     }
     return(Deserialize((MPHitCollision)table, (AttackResult.HitCollsion)obj));
 }