Beispiel #1
0
 public WeihuaGames.ClientClass.BattleRecord FromProtobuf(com.kodgames.corgi.protocol.BattleRecord combatResult)
 {
     this.sceneId            = combatResult.sceneId;
     this.maxRecordCount     = combatResult.maxRecordCount;
     this.matchinRoundRecord = (combatResult.matchinRoundRecord != null) ? new WeihuaGames.ClientClass.RoundRecord().FromProtobuf(combatResult.matchinRoundRecord) : null;
     this.combatRecord       = (combatResult.combatRecord != null) ? new WeihuaGames.ClientClass.CombatRecord().FromProtobuf(combatResult.combatRecord) : null;
     foreach (com.kodgames.corgi.protocol.TeamRecord record in combatResult.teamRecord)
     {
         this.teamRecords.Add(new WeihuaGames.ClientClass.TeamRecord().FromProtobuf(record));
     }
     return(this);
 }
Beispiel #2
0
 public com.kodgames.corgi.protocol.BattleRecord ToProtobuf()
 {
     com.kodgames.corgi.protocol.BattleRecord record = new com.kodgames.corgi.protocol.BattleRecord {
         sceneId        = this.sceneId,
         maxRecordCount = this.maxRecordCount
     };
     foreach (WeihuaGames.ClientClass.TeamRecord record2 in this.teamRecords)
     {
         record.teamRecord.Add(record2.ToProtobuf());
     }
     record.combatRecord = (this.combatRecord != null) ? this.combatRecord.ToProtobuf() : null;
     return(record);
 }