im gonna end it all
dawg i swear sleeping 4h doesnt help
This commit is contained in:
@@ -124,16 +124,19 @@ class VSliceParser {
|
|||||||
arr = arr.concat([true, values.duration == null ? 4 : values.duration, cneEase[0], cneEase[1]]);
|
arr = arr.concat([true, values.duration == null ? 4 : values.duration, cneEase[0], cneEase[1]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (isPosOnly || ((values.x != null && values.x != 0) || (values.y != null && values.y != 0))) {
|
||||||
|
var useNull = arr.length <= 2;
|
||||||
|
result.events.push({
|
||||||
|
time: event.t,
|
||||||
|
name: "Camera Position",
|
||||||
|
params: [values.x, values.y, useNull ? null : arr[1], useNull ? null : arr[2], useNull ? null : arr[3], useNull ? null : arr[4], true]
|
||||||
|
});
|
||||||
|
}
|
||||||
if (!isPosOnly) result.events.push({
|
if (!isPosOnly) result.events.push({
|
||||||
time: event.t,
|
time: event.t,
|
||||||
name: "Camera Movement",
|
name: "Camera Movement",
|
||||||
params: arr
|
params: arr
|
||||||
});
|
});
|
||||||
if (isPosOnly || ((values.x != null && values.x > 0) || (values.y != null && values.y > 0))) result.events.push({
|
|
||||||
time: event.t,
|
|
||||||
name: "Camera Position",
|
|
||||||
params: [values.x, values.y, arr[1], arr[2], arr[3], arr[4], true]
|
|
||||||
});
|
|
||||||
case "PlayAnimation":
|
case "PlayAnimation":
|
||||||
result.events.push({
|
result.events.push({
|
||||||
time: event.t,
|
time: event.t,
|
||||||
|
|||||||
@@ -1465,15 +1465,17 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
case "Camera Movement":
|
case "Camera Movement":
|
||||||
var tween = eventsTween.get("cameraMovement");
|
var tween = eventsTween.get("cameraMovement");
|
||||||
if (tween != null) tween.cancel();
|
if (tween != null) {
|
||||||
|
if (tween.onComplete != null) tween.onComplete(tween);
|
||||||
|
tween.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
curCameraTarget = event.params[0];
|
curCameraTarget = event.params[0];
|
||||||
|
moveCamera();
|
||||||
|
|
||||||
if (strumLines.members[curCameraTarget] != null) {
|
if (strumLines.members[curCameraTarget] != null) {
|
||||||
if (event.params[1] == false) {
|
if (event.params[1] == false) FlxG.camera.snapToTarget();
|
||||||
moveCamera();
|
else if (event.params[3] != null && event.params[3] != "CLASSIC") { // making more nullchecks in this event because of the default save value being false - Nex
|
||||||
FlxG.camera.snapToTarget();
|
|
||||||
} else if (event.params[3] != null && event.params[3] != "CLASSIC") { // making more nullchecks in this event because of the default save value being false - Nex
|
|
||||||
moveCamera();
|
|
||||||
var oldFollow = FlxG.camera.followEnabled;
|
var oldFollow = FlxG.camera.followEnabled;
|
||||||
FlxG.camera.followEnabled = false;
|
FlxG.camera.followEnabled = false;
|
||||||
eventsTween.set("cameraMovement", FlxTween.tween(FlxG.camera.scroll, {x: camFollow.x - FlxG.camera.width * 0.5, y: camFollow.y - FlxG.camera.height * 0.5},
|
eventsTween.set("cameraMovement", FlxTween.tween(FlxG.camera.scroll, {x: camFollow.x - FlxG.camera.width * 0.5, y: camFollow.y - FlxG.camera.height * 0.5},
|
||||||
@@ -1486,19 +1488,21 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
case "Camera Position":
|
case "Camera Position":
|
||||||
var tween = eventsTween.get("cameraMovement");
|
var tween = eventsTween.get("cameraMovement");
|
||||||
if (tween != null) tween.cancel();
|
if (tween != null) {
|
||||||
|
if (tween.onComplete != null) tween.onComplete(tween);
|
||||||
|
tween.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
curCameraTarget = -1;
|
curCameraTarget = -1;
|
||||||
var isOffset = event.params[6] == "true";
|
var isOffset = event.params[6] == true;
|
||||||
camFollow.setPosition(isOffset ? camFollow.x + event.params[0] : event.params[0], isOffset ? camFollow.y + event.params[1] : event.params[1]);
|
camFollow.setPosition(isOffset ? (camFollow.x + event.params[0]) : event.params[0], isOffset ? (camFollow.y + event.params[1]) : event.params[1]);
|
||||||
|
|
||||||
if (event.params[2] == false) {
|
if (event.params[2] == false) FlxG.camera.snapToTarget();
|
||||||
FlxG.camera.snapToTarget();
|
else if (event.params[4] != null && event.params[4] != "CLASSIC") {
|
||||||
} else if (event.params[4] != "CLASSIC") {
|
|
||||||
var oldFollow = FlxG.camera.followEnabled;
|
var oldFollow = FlxG.camera.followEnabled;
|
||||||
FlxG.camera.followEnabled = false;
|
FlxG.camera.followEnabled = false;
|
||||||
eventsTween.set("cameraMovement", FlxTween.tween(FlxG.camera.scroll, {x: camFollow.x - FlxG.camera.width * 0.5, y: camFollow.y - FlxG.camera.height * 0.5},
|
eventsTween.set("cameraMovement", FlxTween.tween(FlxG.camera.scroll, {x: camFollow.x - FlxG.camera.width * 0.5, y: camFollow.y - FlxG.camera.height * 0.5},
|
||||||
(Conductor.stepCrochet / 1000) * event.params[3], {
|
(Conductor.stepCrochet / 1000) * (event.params[3] == null ? 4 : event.params[3]), {
|
||||||
ease: CoolUtil.flxeaseFromString(event.params[4], event.params[5]),
|
ease: CoolUtil.flxeaseFromString(event.params[4], event.params[5]),
|
||||||
onComplete: (_) -> FlxG.camera.followEnabled = oldFollow
|
onComplete: (_) -> FlxG.camera.followEnabled = oldFollow
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user