This commit is contained in:
Yoshman29
2023-01-13 22:12:54 +01:00
parent ed7934b29e
commit e30c392ea9
6 changed files with 15998 additions and 4070 deletions
+6 -3
View File
@@ -815,10 +815,11 @@ class PlayState extends MusicBeatState
scripts.call("destroy");
super.destroy();
FlxDestroyUtil.destroy(scripts);
instance = null;
if (vocals != null) {
vocals.destroy();
@:privateAccess {
FlxG.sound.destroySound(inst);
FlxG.sound.destroySound(vocals);
}
instance = null;
}
public function generateNotes(songData:SwagSong) {
@@ -905,6 +906,8 @@ class PlayState extends MusicBeatState
vocals.loadEmbedded(Paths.voices(PlayState.SONG.song));
FlxG.sound.list.add(vocals);
inst.persist = vocals.persist = false;
notes = new NoteGroup();
add(notes);
+9
View File
@@ -10,6 +10,8 @@ import openfl.system.System;
import openfl.display.Application;
import flixel.math.FlxMath;
import flixel.FlxG;
import openfl.display._internal.stats.Context3DStats;
import openfl.display._internal.stats.DrawCallContext;
class FramerateField extends TextField {
public var showFPS:Bool = true;
@@ -100,6 +102,13 @@ class FramerateField extends TextField {
text.push(Std.string(e));
}
}
#if (gl_stats && !disable_cffi && (!html5 || !canvas))
text.push('=== STATS ===');
text.push("totalDC: " + Context3DStats.totalDrawCalls());
text.push("stageDC: " + Context3DStats.contextDrawCalls(DrawCallContext.STAGE));
text.push("stage3DDC: " + Context3DStats.contextDrawCalls(DrawCallContext.STAGE3D));
#end
}
this.text = text.join("\n");
}