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); }
public static WeihuaGames.ClientClass.RoundRecord CopyTo(WeihuaGames.ClientClass.RoundRecord theOne) { WeihuaGames.ClientClass.RoundRecord record = new WeihuaGames.ClientClass.RoundRecord { roundType = theOne.roundType, teamIndex = theOne.teamIndex, rowIndex = theOne.rowIndex, roundIndex = theOne.roundIndex }; if (theOne.configParameterDic != null) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (KeyValuePair <string, string> pair in theOne.configParameterDic) { dictionary.Add(pair.Key, pair.Value); } record.configParameterDic = dictionary; } foreach (WeihuaGames.ClientClass.TurnRecord record2 in theOne.turnRecords) { record.turnRecords.Add(WeihuaGames.ClientClass.TurnRecord.CopyTo(record2)); } return(record); }