Exemple #1
0
 public WeihuaGames.ClientClass.TeamRecord FromProtobuf(com.kodgames.corgi.protocol.TeamRecord protocol)
 {
     this.teamIndex   = protocol.teamIndex;
     this.isWinner    = protocol.isWinner;
     this.displayName = protocol.displayName;
     this.evaluation  = protocol.evaluation;
     foreach (com.kodgames.corgi.protocol.AvatarResult result in protocol.avatarResults)
     {
         this.avatarResults.Add(new WeihuaGames.ClientClass.AvatarResult().FromProtobuf(result));
     }
     return(this);
 }
Exemple #2
0
 public com.kodgames.corgi.protocol.TeamRecord ToProtobuf()
 {
     com.kodgames.corgi.protocol.TeamRecord record = new com.kodgames.corgi.protocol.TeamRecord {
         teamIndex   = this.teamIndex,
         isWinner    = this.isWinner,
         displayName = this.displayName,
         evaluation  = this.evaluation
     };
     foreach (WeihuaGames.ClientClass.AvatarResult result in this.avatarResults)
     {
         record.avatarResults.Add(result.ToProtobuf());
     }
     return(record);
 }