fixed transition

This commit is contained in:
Yoshman29
2023-02-08 22:55:36 +01:00
parent 390702d265
commit 8aaf97b8b3
4 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -41,7 +41,7 @@
<week name="PICO" chars="pico,bf,gf" sprite="week3">
<song name="Pico" />
<song name="Philly" />
<song name="Philly Nice" />
<song name="Blammed" />
</week>
+1 -1
View File
@@ -1 +1 @@
2231
2235
+7 -2
View File
@@ -631,6 +631,7 @@ class PlayState extends MusicBeatState
FlxG.camera.scroll.set(smoothTransitionData.camX, smoothTransitionData.camY);
FlxG.camera.zoom = smoothTransitionData.camZoom;
FlxTransitionableState.skipNextTransIn = true;
camFollow.setPosition(smoothTransitionData.camFollowX, smoothTransitionData.camFollowY);
} else {
FlxG.camera.focusOn(camFollow.getPosition());
}
@@ -1383,15 +1384,17 @@ class PlayState extends MusicBeatState
stage: curStage,
camX: FlxG.camera.scroll.x,
camY: FlxG.camera.scroll.y,
camFollowX: camFollow.x,
camFollowY: camFollow.y,
camZoom: FlxG.camera.zoom
};
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase(), difficulty);
FlxG.sound.music.stop();
CoolUtil.__loadSong(PlayState.storyPlaylist[0].toLowerCase(), difficulty);
FlxG.switchState(new PlayState());
}
}
@@ -1753,5 +1756,7 @@ typedef PlayStateTransitionData = {
var stage:String;
var camX:Float;
var camY:Float;
var camFollowX:Float;
var camFollowY:Float;
var camZoom:Float;
}
+2
View File
@@ -27,6 +27,7 @@ import flash.geom.ColorTransform;
using StringTools;
@:allow(funkin.game.PlayState)
class CoolUtil
{
/*
@@ -280,6 +281,7 @@ class CoolUtil
PlayState.storyPlaylist = [for(e in weekData.songs) e.name];
PlayState.isStoryMode = true;
PlayState.campaignScore = 0;
PlayState.opponentMode = PlayState.coopMode = false;
__loadSong(PlayState.storyPlaylist[0], difficulty);
}
public static function loadSong(name:String, difficulty:String = "normal", opponentMode:Bool = false, coopMode:Bool = false) {