mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-26 15:07:14 +00:00
camera positioning fixes
This commit is contained in:
parent
992ff442c0
commit
769969898b
|
@ -1490,6 +1490,10 @@ class PlayState extends MusicBeatState implements IHook
|
||||||
if (currentStage == null)
|
if (currentStage == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// HARDCODED +150, CHANGE LATER???
|
||||||
|
var camPosOffsetDad:Float = 150;
|
||||||
|
var camPosOffsetBF:Float = -100;
|
||||||
|
|
||||||
var isFocusedOnDad = cameraFollowPoint.x == currentStage.getDad().cameraFocusPoint.x;
|
var isFocusedOnDad = cameraFollowPoint.x == currentStage.getDad().cameraFocusPoint.x;
|
||||||
var isFocusedOnBF = cameraFollowPoint.x == currentStage.getBoyfriend().cameraFocusPoint.x;
|
var isFocusedOnBF = cameraFollowPoint.x == currentStage.getBoyfriend().cameraFocusPoint.x;
|
||||||
|
|
||||||
|
@ -1498,6 +1502,20 @@ class PlayState extends MusicBeatState implements IHook
|
||||||
// Focus the camera on the player.
|
// Focus the camera on the player.
|
||||||
cameraFollowPoint.setPosition(currentStage.getBoyfriend().cameraFocusPoint.x, currentStage.getBoyfriend().cameraFocusPoint.y);
|
cameraFollowPoint.setPosition(currentStage.getBoyfriend().cameraFocusPoint.x, currentStage.getBoyfriend().cameraFocusPoint.y);
|
||||||
|
|
||||||
|
FlxG.camera.targetOffset.x = camPosOffsetBF;
|
||||||
|
FlxG.camera.targetOffset.y = camPosOffsetBF;
|
||||||
|
|
||||||
|
switch (currentStageId)
|
||||||
|
{
|
||||||
|
case 'limo':
|
||||||
|
FlxG.camera.targetOffset.x = -300;
|
||||||
|
case 'mall':
|
||||||
|
FlxG.camera.targetOffset.y = -200;
|
||||||
|
case 'school' | 'schoolEvil':
|
||||||
|
FlxG.camera.targetOffset.x = -200;
|
||||||
|
FlxG.camera.targetOffset.y = -200;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Un-hardcode this.
|
// TODO: Un-hardcode this.
|
||||||
if (currentSong.song.toLowerCase() == 'tutorial')
|
if (currentSong.song.toLowerCase() == 'tutorial')
|
||||||
FlxTween.tween(FlxG.camera, {zoom: 1 * FlxCamera.defaultZoom}, (Conductor.stepCrochet * 4 / 1000), {ease: FlxEase.elasticInOut});
|
FlxTween.tween(FlxG.camera, {zoom: 1 * FlxCamera.defaultZoom}, (Conductor.stepCrochet * 4 / 1000), {ease: FlxEase.elasticInOut});
|
||||||
|
@ -1507,9 +1525,21 @@ class PlayState extends MusicBeatState implements IHook
|
||||||
// Focus the camera on the opponent.
|
// Focus the camera on the opponent.
|
||||||
cameraFollowPoint.setPosition(currentStage.getDad().cameraFocusPoint.x, currentStage.getDad().cameraFocusPoint.y);
|
cameraFollowPoint.setPosition(currentStage.getDad().cameraFocusPoint.x, currentStage.getDad().cameraFocusPoint.y);
|
||||||
|
|
||||||
|
FlxG.camera.targetOffset.x = camPosOffsetDad;
|
||||||
|
|
||||||
// TODO: Un-hardcode this stuff.
|
// TODO: Un-hardcode this stuff.
|
||||||
if (currentStage.getDad().characterId == 'mom')
|
if (currentStage.getDad().characterId == 'mom')
|
||||||
|
{
|
||||||
vocals.volume = 1;
|
vocals.volume = 1;
|
||||||
|
FlxG.camera.targetOffset.x = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentStage.getDad().characterId == "senpai" || currentStage.getDad().characterId == 'senpai-angry')
|
||||||
|
{
|
||||||
|
FlxG.camera.targetOffset.y = -430;
|
||||||
|
FlxG.camera.targetOffset.x = 100;
|
||||||
|
}
|
||||||
|
|
||||||
if (currentSong.song.toLowerCase() == 'tutorial')
|
if (currentSong.song.toLowerCase() == 'tutorial')
|
||||||
tweenCamIn();
|
tweenCamIn();
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,11 @@ class StageOffsetSubstate extends MusicBeatSubstate
|
||||||
char = cast thing;
|
char = cast thing;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprOld.x = char.x;
|
if (char != null)
|
||||||
sprOld.y = char.y;
|
{
|
||||||
|
sprOld.x = char.x;
|
||||||
|
sprOld.y = char.y;
|
||||||
|
}
|
||||||
|
|
||||||
mosPosOld.x = FlxG.mouse.x;
|
mosPosOld.x = FlxG.mouse.x;
|
||||||
mosPosOld.y = FlxG.mouse.y;
|
mosPosOld.y = FlxG.mouse.y;
|
||||||
|
|
Loading…
Reference in a new issue