Make input packet fields package protected for batching

This commit is contained in:
Cameron Gutman 2014-08-20 21:25:08 -07:00
parent cc92f3829e
commit 6556b3eb9b
4 changed files with 14 additions and 14 deletions

View File

@ -46,13 +46,13 @@ public class ControllerPacket extends InputPacket {
public static final short PACKET_LENGTH = PAYLOAD_LENGTH +
InputPacket.HEADER_LENGTH;
private short buttonFlags;
private byte leftTrigger;
private byte rightTrigger;
private short leftStickX;
private short leftStickY;
private short rightStickX;
private short rightStickY;
short buttonFlags;
byte leftTrigger;
byte rightTrigger;
short leftStickX;
short leftStickY;
short rightStickX;
short rightStickY;
public ControllerPacket(short buttonFlags, byte leftTrigger, byte rightTrigger,
short leftStickX, short leftStickY,

View File

@ -15,9 +15,9 @@ public class KeyboardPacket extends InputPacket {
public static final byte MODIFIER_ALT = 0x04;
private short keyCode;
private byte keyDirection;
private byte modifier;
short keyCode;
byte keyDirection;
byte modifier;
public KeyboardPacket(short keyCode, byte keyDirection, byte modifier) {
super(PACKET_TYPE);

View File

@ -5,8 +5,8 @@ import java.nio.ByteOrder;
public class MouseButtonPacket extends InputPacket {
private byte buttonEventType;
private byte mouseButton;
byte buttonEventType;
byte mouseButton;
public static final int PACKET_TYPE = 0x5;
public static final int PAYLOAD_LENGTH = 5;

View File

@ -17,8 +17,8 @@ public class MouseMovePacket extends InputPacket {
public static final int PACKET_LENGTH = PAYLOAD_LENGTH +
InputPacket.HEADER_LENGTH;
private short deltaX;
private short deltaY;
short deltaX;
short deltaY;
public MouseMovePacket(short deltaX, short deltaY)
{