renamed "audio" to "song" + stress fix
This commit is contained in:
@@ -29,6 +29,7 @@ import funkin.windows.WindowsAPI.ConsoleColor;
|
||||
|
||||
class Flx3DView extends FlxView3D {
|
||||
|
||||
var meshes:Array<Mesh> = [];
|
||||
public function new(x:Float = 0, y:Float = 0, width:Int = -1, height:Int = -1) {
|
||||
if (!Flx3DUtil.is3DAvailable())
|
||||
throw "[Flx3DView] 3D is not available on this platform. Stages in use: " + Flx3DUtil.getTotal3D() + ", Max stages allowed: " + FlxG.stage.stage3Ds.length + ".";
|
||||
@@ -61,6 +62,7 @@ class Flx3DView extends FlxView3D {
|
||||
var mesh:Mesh = cast(event.asset, Mesh);
|
||||
if (material != null)
|
||||
mesh.material = material;
|
||||
meshes.push(mesh);
|
||||
}
|
||||
callback(event);
|
||||
});
|
||||
@@ -118,6 +120,9 @@ class Flx3DView extends FlxView3D {
|
||||
|
||||
override function destroy() {
|
||||
super.destroy();
|
||||
if (meshes != null)
|
||||
for(mesh in meshes)
|
||||
mesh.dispose();
|
||||
}
|
||||
|
||||
public inline function addChild(c)
|
||||
|
||||
@@ -110,14 +110,14 @@ class Paths
|
||||
|
||||
inline static public function voices(song:String, difficulty:String = "normal")
|
||||
{
|
||||
var diff = getPath('songs/${song.toLowerCase()}/audio/Voices-$difficulty.$SOUND_EXT', MUSIC, null);
|
||||
return OpenFlAssets.exists(diff) ? diff : getPath('songs/${song.toLowerCase()}/audio/Voices.$SOUND_EXT', MUSIC, null);
|
||||
var diff = getPath('songs/${song.toLowerCase()}/song/Voices-$difficulty.$SOUND_EXT', MUSIC, null);
|
||||
return OpenFlAssets.exists(diff) ? diff : getPath('songs/${song.toLowerCase()}/song/Voices.$SOUND_EXT', MUSIC, null);
|
||||
}
|
||||
|
||||
inline static public function inst(song:String, difficulty:String = "normal")
|
||||
{
|
||||
var diff = getPath('songs/${song.toLowerCase()}/audio/Inst-$difficulty.$SOUND_EXT', MUSIC, null);
|
||||
return OpenFlAssets.exists(diff) ? diff : getPath('songs/${song.toLowerCase()}/audio/Inst.$SOUND_EXT', MUSIC, null);
|
||||
var diff = getPath('songs/${song.toLowerCase()}/song/Inst-$difficulty.$SOUND_EXT', MUSIC, null);
|
||||
return OpenFlAssets.exists(diff) ? diff : getPath('songs/${song.toLowerCase()}/song/Inst.$SOUND_EXT', MUSIC, null);
|
||||
}
|
||||
|
||||
inline static public function image(key:String, ?library:String, checkForAtlas:Bool = false)
|
||||
|
||||
Reference in New Issue
Block a user