示例#1
0
 public static WeihuaGames.ClientClass.ActionRecord CopyTo(WeihuaGames.ClientClass.ActionRecord theOne)
 {
     WeihuaGames.ClientClass.ActionRecord record = new WeihuaGames.ClientClass.ActionRecord {
         actionId       = theOne.actionId,
         srcAvatarIndex = theOne.srcAvatarIndex
     };
     record.targetAvatarIndices.AddRange(theOne.targetAvatarIndices);
     foreach (WeihuaGames.ClientClass.EventRecord record2 in theOne.eventRecords)
     {
         record.eventRecords.Add(WeihuaGames.ClientClass.EventRecord.CopyTo(record2));
     }
     return(record);
 }
示例#2
0
 public WeihuaGames.ClientClass.AvatarResult FromProtobuf(com.kodgames.corgi.protocol.AvatarResult protocol)
 {
     this.avatarIndex = protocol.avatarIndex;
     this.teamIndex   = protocol.teamIndex;
     this.leftHP      = protocol.leftHP;
     this.maxHP       = protocol.maxHP;
     if (protocol.endAction != null)
     {
         this.endAction = new WeihuaGames.ClientClass.ActionRecord().FromProtobuf(protocol.endAction);
     }
     if (protocol.combatAvatarData != null)
     {
         this.combatAvatarData = new WeihuaGames.ClientClass.CombatAvatarData().FromProtobuf(protocol.combatAvatarData);
     }
     return(this);
 }