Refactored changed time to delta where appropriate

This commit is contained in:
Collin Smith 2020-06-24 00:59:26 -07:00
parent 1426b87534
commit e07e6bd2ba
6 changed files with 9 additions and 9 deletions

View File

@ -19,7 +19,7 @@ public abstract class MessageChannel implements ReliablePacketController.PacketL
}
public abstract void reset();
public abstract void update(long time, DatagramChannel ch);
public abstract void update(long delta, DatagramChannel ch);
public abstract void sendMessage(int channelId, DatagramChannel ch, ByteBuf bb);
public abstract void onMessageReceived(ChannelHandlerContext ctx, DatagramPacket packet);

View File

@ -53,8 +53,8 @@ public class ReliableEndpoint implements MessageChannel.PacketTransceiver {
for (MessageChannel mc : channels) if (mc != null) mc.reset();
}
public void update(long time) {
for (MessageChannel mc : channels) if (mc != null) mc.update(time, channel);
public void update(long delta) {
for (MessageChannel mc : channels) if (mc != null) mc.update(delta, channel);
}
public void sendMessage(QoS qos, ByteBuffer bb) {

View File

@ -46,7 +46,7 @@ public class ReliablePacketController {
}
public void update(long time) {
public void update(long delta) {
this.time = time;
}

View File

@ -22,7 +22,7 @@ public class ReliableMessageChannel extends MessageChannel {
}
@Override
public void update(long time, DatagramChannel ch) {
public void update(long delta, DatagramChannel ch) {
}

View File

@ -36,8 +36,8 @@ public class UnreliableMessageChannel extends MessageChannel {
}
@Override
public void update(long time, DatagramChannel ch) {
packetController.update(time);
public void update(long delta, DatagramChannel ch) {
packetController.update(delta);
}
@Override

View File

@ -31,8 +31,8 @@ public class UnreliableOrderedMessageChannel extends MessageChannel {
}
@Override
public void update(long time, DatagramChannel ch) {
packetController.update(time);
public void update(long delta, DatagramChannel ch) {
packetController.update(delta);
}
@Override