public static void Decode(WebProtocol.FlatBuffersProtocol.Enemy destination, global::FlatBuffersProtocol.Enemy source) { destination.id = source.Id; if (source.Position.HasValue) { destination.position = FlatBuffersFacility.Pool.Get <FlatBuffersProtocol.Vec3>(); Decode(destination.position, source.Position.Value); } for (int i = 0; i < source.InventoryIdsLength; i++) { destination.inventoryIds.Add(source.InventoryIds(i)); } if (source.Weapon.HasValue) { destination.weapon = FlatBuffersFacility.Pool.Get <FlatBuffersProtocol.Weapon>(); Decode(destination.weapon, source.Weapon.Value); } destination.teamId = source.TeamId; }
public void Decode(ByteBuffer bb) { global::FlatBuffersProtocol.Enemy source = global::FlatBuffersProtocol.Enemy.GetRootAsEnemy(bb); WebProtocolConvertMethods.Decode(this, source); }