dae models support
This commit is contained in:
@@ -155,12 +155,14 @@ class FreeplayState extends MusicBeatState
|
||||
// putting it before so that its actually smooth
|
||||
updateOptionsAlpha();
|
||||
|
||||
var dontPlaySongThisFrame = false;
|
||||
#if PRELOAD_ALL
|
||||
autoplayElapsed += elapsed;
|
||||
if (!songInstPlaying && (autoplayElapsed > timeUntilAutoplay || FlxG.keys.justPressed.SPACE)) {
|
||||
if (curPlayingInst != (curPlayingInst = Paths.inst(songs[curSelected].songName, songs[curSelected].difficulties[curDifficulty])))
|
||||
FlxG.sound.playMusic(curPlayingInst, 0);
|
||||
songInstPlaying = true;
|
||||
dontPlaySongThisFrame = true;
|
||||
}
|
||||
#end
|
||||
|
||||
@@ -171,7 +173,7 @@ class FreeplayState extends MusicBeatState
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
|
||||
if (controls.ACCEPT)
|
||||
if (controls.ACCEPT && !dontPlaySongThisFrame)
|
||||
{
|
||||
CoolUtil.loadSong(songs[curSelected].songName, songs[curSelected].difficulties[curDifficulty]);
|
||||
FlxG.switchState(new PlayState());
|
||||
|
||||
@@ -159,10 +159,7 @@ class CoolUtil
|
||||
"BPM" => null
|
||||
]);
|
||||
var parsedBPM:Null<Float> = Std.parseFloat(musicInfo["BPM"]);
|
||||
if (parsedBPM == null)
|
||||
Conductor.changeBPM(DefaultBPM);
|
||||
else
|
||||
Conductor.changeBPM(parsedBPM);
|
||||
Conductor.changeBPM(parsedBPM == null ? DefaultBPM : parsedBPM);
|
||||
} else
|
||||
Conductor.changeBPM(DefaultBPM);
|
||||
}
|
||||
|
||||
@@ -176,6 +176,22 @@ class Paths
|
||||
return getPath('models/$key.obj', BINARY, null);
|
||||
}
|
||||
|
||||
inline static public function dae(key:String) {
|
||||
return getPath('models/$key.dae', BINARY, null);
|
||||
}
|
||||
|
||||
inline static public function md2(key:String) {
|
||||
return getPath('models/$key.md2', BINARY, null);
|
||||
}
|
||||
|
||||
inline static public function md5(key:String) {
|
||||
return getPath('models/$key.md5', BINARY, null);
|
||||
}
|
||||
|
||||
inline static public function awd(key:String) {
|
||||
return getPath('models/$key.awd', BINARY, null);
|
||||
}
|
||||
|
||||
inline static public function getSparrowAtlas(key:String, ?library:String)
|
||||
{
|
||||
return FlxAtlasFrames.fromSparrow(image(key, library), file('images/$key.xml', library));
|
||||
|
||||
Reference in New Issue
Block a user