Пример #1
0
 public com.kodgames.corgi.protocol.RoundRecord ToProtobuf()
 {
     com.kodgames.corgi.protocol.RoundRecord record = new com.kodgames.corgi.protocol.RoundRecord {
         roundType  = this.roundType,
         teamIndex  = this.teamIndex,
         rowIndex   = this.rowIndex,
         roundIndex = this.roundIndex
     };
     foreach (WeihuaGames.ClientClass.TurnRecord record2 in this.turnRecords)
     {
         record.turnRecords.Add(record2.ToProtobuf());
     }
     if (this.configParameterDic != null)
     {
         record.customRoundParameters.Clear();
         foreach (KeyValuePair <string, string> pair in this.configParameterDic)
         {
             com.kodgames.corgi.protocol.ConfigParameter item = new com.kodgames.corgi.protocol.ConfigParameter {
                 name  = pair.Key,
                 value = pair.Value
             };
             record.customRoundParameters.Add(item);
         }
     }
     return(record);
 }
Пример #2
0
 public WeihuaGames.ClientClass.ConfigParameter FromProtobuf(com.kodgames.corgi.protocol.ConfigParameter configParameter)
 {
     this.name  = configParameter.name;
     this.value = configParameter.value;
     return(this);
 }