Ejemplo n.º 1
0
 public WeihuaGames.ClientClass.ActionRecord FromProtobuf(com.kodgames.corgi.protocol.ActionRecord actionRecord)
 {
     this.actionId       = (int)actionRecord.actionId;
     this.srcAvatarIndex = actionRecord.srcAvatarIndex;
     this.targetAvatarIndices.AddRange(actionRecord.targetAvatarIndeices);
     foreach (com.kodgames.corgi.protocol.EventRecord record in actionRecord.eventRecords)
     {
         this.eventRecords.Add(new WeihuaGames.ClientClass.EventRecord().FromProtobuf(record));
     }
     return(this);
 }
Ejemplo n.º 2
0
 public com.kodgames.corgi.protocol.ActionRecord ToProtobuf()
 {
     com.kodgames.corgi.protocol.ActionRecord record = new com.kodgames.corgi.protocol.ActionRecord {
         actionId       = (uint)this.actionId,
         srcAvatarIndex = this.srcAvatarIndex
     };
     record.targetAvatarIndeices.AddRange(this.targetAvatarIndices);
     foreach (WeihuaGames.ClientClass.EventRecord record2 in this.eventRecords)
     {
         record.eventRecords.Add(record2.ToProtobuf());
     }
     return(record);
 }