mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-29 00:08:11 +00:00
[BUGFIX] Fix an issue where PlayState would crash after the second song. (#216)
* Ignore blank lines in intro text * Add a check when trying to render destroyed graphics. * Persist noteSplash graphic so it isn't destroyed.
This commit is contained in:
parent
0e21220e24
commit
260f1bd265
2
hmm.json
2
hmm.json
|
@ -11,7 +11,7 @@
|
||||||
"name": "flixel",
|
"name": "flixel",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"dir": null,
|
"dir": null,
|
||||||
"ref": "32cee07a0e5f21e590a4b21234603b2cd5898b10",
|
"ref": "8437a86aa5dafdb3f5dcb91d212cb10a4ee6e53b",
|
||||||
"url": "https://github.com/EliteMasterEric/flixel"
|
"url": "https://github.com/EliteMasterEric/flixel"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,7 @@ class NoteSplash extends FlxSprite
|
||||||
public static function preloadFrames():Void
|
public static function preloadFrames():Void
|
||||||
{
|
{
|
||||||
frameCollection = Paths.getSparrowAtlas('noteSplashes');
|
frameCollection = Paths.getSparrowAtlas('noteSplashes');
|
||||||
|
frameCollection.parent.persist = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function new()
|
public function new()
|
||||||
|
|
|
@ -232,7 +232,8 @@ class TitleState extends MusicBeatState
|
||||||
{
|
{
|
||||||
var fullText:String = Assets.getText(Paths.txt('introText'));
|
var fullText:String = Assets.getText(Paths.txt('introText'));
|
||||||
|
|
||||||
var firstArray:Array<String> = fullText.split('\n');
|
// Split into lines and remove empty lines
|
||||||
|
var firstArray:Array<String> = fullText.split('\n').filter(function(s:String) return s != '');
|
||||||
var swagGoodArray:Array<Array<String>> = [];
|
var swagGoodArray:Array<Array<String>> = [];
|
||||||
|
|
||||||
for (i in firstArray)
|
for (i in firstArray)
|
||||||
|
|
Loading…
Reference in a new issue