Esempio n. 1
0
 public void WriteToByteArray(ByteArray byteArray)
 {
     byteArray.WriteUTF(this.Player);
     BattleMoveHelper.WriteToByteArray(byteArray, this.Move);
     PokemonIndexHelper.WriteToByteArray(byteArray, this.Pokemon);
     TargetIndexHelper.WriteToByteArray(byteArray, this.Target);
     byteArray.WriteByte(this.MoveIndex);
 }
Esempio n. 2
0
 public void ReadFromByteArray(ByteArray byteArray)
 {
     this.Player    = byteArray.ReadUTF();
     this.Move      = BattleMoveHelper.ReadFromByteArray(byteArray);
     this.Pokemon   = PokemonIndexHelper.ReadFromByteArray(byteArray);
     this.Target    = TargetIndexHelper.ReadFromByteArray(byteArray);
     this.MoveIndex = byteArray.ReadByte();
 }