@@ -0,0 +1,1279 @@
+package com.ezardlabs.lostsector.multiplayer;%0A%0Aimport com.ezardlabs.dethsquare.Animator;%0Aimport com.ezardlabs.dethsquare.multiplayer.Network;%0Aimport com.ezardlabs.dethsquare.multiplayer.NetworkBehaviour;%0Aimport com.ezardlabs.lostsector.objects.Player;%0A%0Aimport java.nio.ByteBuffer;%0A%0Apublic class PlayerNetworkBehaviour extends NetworkBehaviour %7B%0A%09protected final ByteBuffer data = ByteBuffer.allocate(getSize());%0A%09private Animator animator;%0A%0A%09@Override%0A%09public void start() %7B%0A%09%09super.start();%0A%09%09animator = gameObject.getComponent(Animator.class);%0A%0A%09%09if (playerId != Network.getPlayerID()) %7B%0A%09%09%09gameObject.removeComponent(Player.class);%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09protected ByteBuffer onSend() %7B%0A%09%09data.putFloat(0, transform.position.x); // 0 - 3%0A%09%09data.putFloat(4, transform.position.y); // 4 - 7%0A%09%09data.putInt(8, animator.getCurrentAnimationId()); // 8 - 11%0A%09%09data.putInt(12, animator.getCurrentAnimationFrame()); // 12 - 15%0A%09%09return data;%0A%09%7D%0A%0A%09@Override%0A%09protected void onReceive(ByteBuffer data, int index) %7B%0A%09%09transform.position.x = data.getFloat(index);%0A%09%09transform.position.y = data.getFloat(index + 4);%0A%09%09animator.setCurrentAnimationId(data.getInt(index + 8));%0A%09%09animator.setCurrentAnimationFrame(data.getInt(index + 12));%0A%09%7D%0A%0A%09@Override%0A%09public int getSize() %7B%0A%09%09return 16;%0A%09%7D%0A%7D%0A

Add NetworkBehaviour class to use on player GameObjects