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)
|
||||
return;
|
||||
|
||||
// HARDCODED +150, CHANGE LATER???
|
||||
var camPosOffsetDad:Float = 150;
|
||||
var camPosOffsetBF:Float = -100;
|
||||
|
||||
var isFocusedOnDad = cameraFollowPoint.x == currentStage.getDad().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.
|
||||
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.
|
||||
if (currentSong.song.toLowerCase() == 'tutorial')
|
||||
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.
|
||||
cameraFollowPoint.setPosition(currentStage.getDad().cameraFocusPoint.x, currentStage.getDad().cameraFocusPoint.y);
|
||||
|
||||
FlxG.camera.targetOffset.x = camPosOffsetDad;
|
||||
|
||||
// TODO: Un-hardcode this stuff.
|
||||
if (currentStage.getDad().characterId == 'mom')
|
||||
{
|
||||
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')
|
||||
tweenCamIn();
|
||||
}
|
||||
|
|
|
@ -76,8 +76,11 @@ class StageOffsetSubstate extends MusicBeatSubstate
|
|||
char = cast thing;
|
||||
}
|
||||
|
||||
if (char != null)
|
||||
{
|
||||
sprOld.x = char.x;
|
||||
sprOld.y = char.y;
|
||||
}
|
||||
|
||||
mosPosOld.x = FlxG.mouse.x;
|
||||
mosPosOld.y = FlxG.mouse.y;
|
||||
|
|
Loading…
Reference in a new issue