public virtual bool Store(MemoryStream _buf_) { try { if (false == Vector2Int_Serializer.Store(_buf_, destination)) { return(false); } } catch (System.Exception) { return(false); } return(true); }
public virtual bool Store(MemoryStream _buf_) { try { _buf_.Write(BitConverter.GetBytes(unit_seq), 0, sizeof(ulong)); if (false == Vector2Int_Serializer.Store(_buf_, position)) { return(false); } } catch (System.Exception) { return(false); } return(true); }
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); }