add Paths asset name helper
This commit is contained in:
@ -118,10 +118,10 @@ class TitleState extends MusicBeatState
|
||||
// https://github.com/HaxeFlixel/flixel-addons/pull/348
|
||||
|
||||
// var music:FlxSound = new FlxSound();
|
||||
// music.loadStream('assets/music/freakyMenu' + TitleState.soundExt);
|
||||
// music.loadStream(Paths.music('freakyMenu'));
|
||||
// FlxG.sound.list.add(music);
|
||||
// music.play();
|
||||
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt, 0);
|
||||
FlxG.sound.playMusic(Paths.music('freakyMenu'), 0);
|
||||
|
||||
FlxG.sound.music.fadeIn(4, 0, 0.7);
|
||||
}
|
||||
@ -136,7 +136,7 @@ class TitleState extends MusicBeatState
|
||||
add(bg);
|
||||
|
||||
logoBl = new FlxSprite(-150, -100);
|
||||
logoBl.frames = FlxAtlasFrames.fromSparrow('assets/images/logoBumpin.png', 'assets/images/logoBumpin.xml');
|
||||
logoBl.frames = Paths.getSparrowAtlas('logoBumpin');
|
||||
logoBl.antialiasing = true;
|
||||
logoBl.animation.addByPrefix('bump', 'logo bumpin', 24);
|
||||
logoBl.animation.play('bump');
|
||||
@ -145,7 +145,7 @@ class TitleState extends MusicBeatState
|
||||
// logoBl.color = FlxColor.BLACK;
|
||||
|
||||
gfDance = new FlxSprite(FlxG.width * 0.4, FlxG.height * 0.07);
|
||||
gfDance.frames = FlxAtlasFrames.fromSparrow('assets/images/gfDanceTitle.png', 'assets/images/gfDanceTitle.xml');
|
||||
gfDance.frames = Paths.getSparrowAtlas('gfDanceTitle');
|
||||
gfDance.animation.addByIndices('danceLeft', 'gfDance', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
|
||||
gfDance.animation.addByIndices('danceRight', 'gfDance', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
|
||||
gfDance.antialiasing = true;
|
||||
@ -153,7 +153,7 @@ class TitleState extends MusicBeatState
|
||||
add(logoBl);
|
||||
|
||||
titleText = new FlxSprite(100, FlxG.height * 0.8);
|
||||
titleText.frames = FlxAtlasFrames.fromSparrow('assets/images/titleEnter.png', 'assets/images/titleEnter.xml');
|
||||
titleText.frames = Paths.getSparrowAtlas('titleEnter');
|
||||
titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24);
|
||||
titleText.animation.addByPrefix('press', "ENTER PRESSED", 24);
|
||||
titleText.antialiasing = true;
|
||||
@ -162,7 +162,7 @@ class TitleState extends MusicBeatState
|
||||
// titleText.screenCenter(X);
|
||||
add(titleText);
|
||||
|
||||
var logo:FlxSprite = new FlxSprite().loadGraphic('assets/images/logo.png');
|
||||
var logo:FlxSprite = new FlxSprite().loadGraphic(Paths.image('logo'));
|
||||
logo.screenCenter();
|
||||
logo.antialiasing = true;
|
||||
// add(logo);
|
||||
@ -184,7 +184,7 @@ class TitleState extends MusicBeatState
|
||||
|
||||
credTextShit.visible = false;
|
||||
|
||||
ngSpr = new FlxSprite(0, FlxG.height * 0.52).loadGraphic('assets/images/newgrounds_logo.png');
|
||||
ngSpr = new FlxSprite(0, FlxG.height * 0.52).loadGraphic(Paths.image('newgrounds_logo'));
|
||||
add(ngSpr);
|
||||
ngSpr.visible = false;
|
||||
ngSpr.setGraphicSize(Std.int(ngSpr.width * 0.8));
|
||||
@ -259,7 +259,7 @@ class TitleState extends MusicBeatState
|
||||
titleText.animation.play('press');
|
||||
|
||||
FlxG.camera.flash(FlxColor.WHITE, 1);
|
||||
FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt, 0.7);
|
||||
FlxG.sound.play(Paths.sound('confirmMenu'), 0.7);
|
||||
|
||||
transitioning = true;
|
||||
// FlxG.sound.music.stop();
|
||||
@ -280,7 +280,7 @@ class TitleState extends MusicBeatState
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
});
|
||||
// FlxG.sound.play('assets/music/titleShoot' + TitleState.soundExt, 0.7);
|
||||
// FlxG.sound.play(Paths.music('titleShoot'), 0.7);
|
||||
}
|
||||
|
||||
if (pressedEnter && !skippedIntro)
|
||||
|
Reference in New Issue
Block a user