Added prerequisites for future Camera Tilt feature

This commit is contained in:
CrushedPixel
2015-05-05 10:52:06 +02:00
parent a0c204d29d
commit 36eab58705
7 changed files with 56 additions and 4 deletions

View File

@@ -32,6 +32,8 @@ public class ReplayHandler {
private static Entity currentEntity = null;
private static Position lastPosition = null;
private static float cameraTilt = 0;
private static KeyframeSet[] keyframeRepository = new KeyframeSet[]{};
public static KeyframeSet[] getKeyframeRepository() {
@@ -102,6 +104,18 @@ public class ReplayHandler {
spectateCamera();
}
public static float getCameraTilt() {
return cameraTilt;
}
public static void setCameraTilt(float tilt) {
cameraTilt = tilt;
}
public static void addCameraTilt(float tilt) {
cameraTilt += tilt;
}
public static void sortKeyframes() {
Collections.sort(keyframes, new KeyframeComparator());
}
@@ -281,6 +295,8 @@ public class ReplayHandler {
channel.close();
}
setCameraTilt(0);
networkManager = new NetworkManager(EnumPacketDirection.CLIENTBOUND);
INetHandlerPlayClient pc = new NetHandlerPlayClient(mc, null, networkManager, new GameProfile(UUID.randomUUID(), "Player"));
networkManager.setNetHandler(pc);