Beispiel #1
0
 public virtual bool Store(MemoryStream _buf_)
 {
     try {
         if (false == ErrorCode_Serializer.Store(_buf_, error_code))
         {
             return(false);
         }
     } catch (System.Exception) {
         return(false);
     }
     return(true);
 }
Beispiel #2
0
 public virtual bool Store(MemoryStream _buf_)
 {
     try {
         if (false == ErrorCode_Serializer.Store(_buf_, error_code))
         {
             return(false);
         }
         _buf_.Write(BitConverter.GetBytes(mail_seq), 0, sizeof(ulong));
     } catch (System.Exception) {
         return(false);
     }
     return(true);
 }
Beispiel #3
0
 public bool Store(MemoryStream _buf_)
 {
     try {
         if (false == ErrorCode_Serializer.Store(_buf_, error_code))
         {
             return(false);
         }
         if (false == UserData_Serializer.Store(_buf_, user_data))
         {
             return(false);
         }
     } catch (System.Exception) {
         return(false);
     }
     return(true);
 }
Beispiel #4
0
 public virtual bool Store(MemoryStream _buf_)
 {
     try {
         if (false == ErrorCode_Serializer.Store(_buf_, error_code))
         {
             return(false);
         }
         _buf_.Write(BitConverter.GetBytes(width), 0, sizeof(int));
         _buf_.Write(BitConverter.GetBytes(height), 0, sizeof(int));
         _buf_.Write(BitConverter.GetBytes(tiles.Count), 0, sizeof(int));
         foreach (var tiles_itr in tiles)
         {
             DungeonTileType tiles_elmt = tiles_itr;
             if (false == DungeonTileType_Serializer.Store(_buf_, tiles_elmt))
             {
                 return(false);
             }
         }
         _buf_.Write(BitConverter.GetBytes(unit_seq), 0, sizeof(ulong));
         if (false == Vector2Int_Serializer.Store(_buf_, position))
         {
             return(false);
         }
         _buf_.Write(BitConverter.GetBytes(comrades.Count), 0, sizeof(int));
         foreach (var comrades_itr in comrades)
         {
             Player comrades_elmt = comrades_itr;
             if (false == Player_Serializer.Store(_buf_, comrades_elmt))
             {
                 return(false);
             }
         }
         _buf_.Write(BitConverter.GetBytes(enemies.Count), 0, sizeof(int));
         foreach (var enemies_itr in enemies)
         {
             Monster enemies_elmt = enemies_itr;
             if (false == Monster_Serializer.Store(_buf_, enemies_elmt))
             {
                 return(false);
             }
         }
     } catch (System.Exception) {
         return(false);
     }
     return(true);
 }