intro messages
This commit is contained in:
parent
12913b4f31
commit
cc66469d30
|
@ -94,5 +94,5 @@
|
|||
|
||||
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
||||
<icon path="art/icon.png"/>
|
||||
<haxedef name="SKIP_TO_PLAYSTATE" if="debug" />
|
||||
<!-- <haxedef name="SKIP_TO_PLAYSTATE" if="debug" /> -->
|
||||
</project>
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 275 KiB |
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextureAtlas imagePath="FNF_main_menu_assets.png">
|
||||
<!-- Created with Adobe Animate version 20.0.0.17400 -->
|
||||
<!-- http://www.adobe.com/products/animate.html -->
|
||||
<SubTexture name="donate basic0000" x="0" y="0" width="444" height="117"/>
|
||||
<SubTexture name="donate basic0001" x="0" y="0" width="444" height="117"/>
|
||||
<SubTexture name="donate basic0002" x="0" y="0" width="444" height="117"/>
|
||||
<SubTexture name="donate basic0003" x="454" y="0" width="444" height="117"/>
|
||||
<SubTexture name="donate basic0004" x="454" y="0" width="444" height="117"/>
|
||||
<SubTexture name="donate basic0005" x="454" y="0" width="444" height="117"/>
|
||||
<SubTexture name="donate basic0006" x="908" y="0" width="444" height="117"/>
|
||||
<SubTexture name="donate basic0007" x="908" y="0" width="444" height="117"/>
|
||||
<SubTexture name="donate basic0008" x="908" y="0" width="444" height="117"/>
|
||||
<SubTexture name="donate white0000" x="1362" y="0" width="590" height="157" frameX="0" frameY="-2" frameWidth="590" frameHeight="159"/>
|
||||
<SubTexture name="donate white0001" x="0" y="167" width="587" height="154" frameX="-1" frameY="-5" frameWidth="590" frameHeight="159"/>
|
||||
<SubTexture name="donate white0002" x="597" y="167" width="585" height="155" frameX="-3" frameY="0" frameWidth="590" frameHeight="159"/>
|
||||
<SubTexture name="freeplay basic0000" x="1192" y="167" width="484" height="122"/>
|
||||
<SubTexture name="freeplay basic0001" x="1192" y="167" width="484" height="122"/>
|
||||
<SubTexture name="freeplay basic0002" x="1192" y="167" width="484" height="122"/>
|
||||
<SubTexture name="freeplay basic0003" x="0" y="332" width="484" height="122"/>
|
||||
<SubTexture name="freeplay basic0004" x="0" y="332" width="484" height="122"/>
|
||||
<SubTexture name="freeplay basic0005" x="0" y="332" width="484" height="122"/>
|
||||
<SubTexture name="freeplay basic0006" x="494" y="332" width="484" height="122"/>
|
||||
<SubTexture name="freeplay basic0007" x="494" y="332" width="484" height="122"/>
|
||||
<SubTexture name="freeplay basic0008" x="494" y="332" width="484" height="122"/>
|
||||
<SubTexture name="freeplay white0000" x="988" y="332" width="627" height="169" frameX="0" frameY="0" frameWidth="635" frameHeight="174"/>
|
||||
<SubTexture name="freeplay white0001" x="0" y="511" width="632" height="170" frameX="-3" frameY="-1" frameWidth="635" frameHeight="174"/>
|
||||
<SubTexture name="freeplay white0002" x="642" y="511" width="629" height="173" frameX="-4" frameY="-1" frameWidth="635" frameHeight="174"/>
|
||||
<SubTexture name="options basic0000" x="1281" y="511" width="487" height="111"/>
|
||||
<SubTexture name="options basic0001" x="1281" y="511" width="487" height="111"/>
|
||||
<SubTexture name="options basic0002" x="1281" y="511" width="487" height="111"/>
|
||||
<SubTexture name="options basic0003" x="0" y="694" width="487" height="111"/>
|
||||
<SubTexture name="options basic0004" x="0" y="694" width="487" height="111"/>
|
||||
<SubTexture name="options basic0005" x="0" y="694" width="487" height="111"/>
|
||||
<SubTexture name="options basic0006" x="497" y="694" width="487" height="111"/>
|
||||
<SubTexture name="options basic0007" x="497" y="694" width="487" height="111"/>
|
||||
<SubTexture name="options basic0008" x="497" y="694" width="487" height="111"/>
|
||||
<SubTexture name="options white0000" x="994" y="694" width="606" height="155" frameX="-2" frameY="-1" frameWidth="610" frameHeight="163"/>
|
||||
<SubTexture name="options white0001" x="0" y="859" width="607" height="158" frameX="-3" frameY="-1" frameWidth="610" frameHeight="163"/>
|
||||
<SubTexture name="options white0002" x="617" y="859" width="610" height="163"/>
|
||||
<SubTexture name="story mode basic0000" x="1237" y="859" width="615" height="122"/>
|
||||
<SubTexture name="story mode basic0001" x="1237" y="859" width="615" height="122"/>
|
||||
<SubTexture name="story mode basic0002" x="1237" y="859" width="615" height="122"/>
|
||||
<SubTexture name="story mode basic0003" x="0" y="1032" width="615" height="122"/>
|
||||
<SubTexture name="story mode basic0004" x="0" y="1032" width="615" height="122"/>
|
||||
<SubTexture name="story mode basic0005" x="0" y="1032" width="615" height="122"/>
|
||||
<SubTexture name="story mode basic0006" x="625" y="1032" width="615" height="122"/>
|
||||
<SubTexture name="story mode basic0007" x="625" y="1032" width="615" height="122"/>
|
||||
<SubTexture name="story mode basic0008" x="625" y="1032" width="615" height="122"/>
|
||||
<SubTexture name="story mode white0000" x="1250" y="1032" width="796" height="173" frameX="0" frameY="-3" frameWidth="796" frameHeight="181"/>
|
||||
<SubTexture name="story mode white0001" x="0" y="1215" width="794" height="174" frameX="-2" frameY="-2" frameWidth="796" frameHeight="181"/>
|
||||
<SubTexture name="story mode white0002" x="804" y="1215" width="794" height="181" frameX="0" frameY="0" frameWidth="796" frameHeight="181"/>
|
||||
</TextureAtlas>
|
Binary file not shown.
After Width: | Height: | Size: 606 KiB |
|
@ -18,6 +18,7 @@ import flixel.group.FlxGroup.FlxTypedGroup;
|
|||
import flixel.group.FlxGroup;
|
||||
import flixel.math.FlxMath;
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.system.FlxSound;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.ui.FlxButton;
|
||||
import flixel.ui.FlxSpriteButton;
|
||||
|
@ -71,6 +72,8 @@ class ChartingState extends MusicBeatState
|
|||
|
||||
var tempBpm:Int = 0;
|
||||
|
||||
var vocals:FlxSound;
|
||||
|
||||
override function create()
|
||||
{
|
||||
gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16);
|
||||
|
@ -276,12 +279,24 @@ class ChartingState extends MusicBeatState
|
|||
function loadSong(daSong:String):Void
|
||||
{
|
||||
if (FlxG.sound.music != null)
|
||||
{
|
||||
FlxG.sound.music.stop();
|
||||
// vocals.stop();
|
||||
}
|
||||
|
||||
FlxG.sound.playMusic('assets/music/' + daSong + "_Inst" + TitleState.soundExt, 0.6);
|
||||
|
||||
// WONT WORK FOR TUTORIAL! REDO LATER
|
||||
vocals = new FlxSound().loadEmbedded("assets/music/" + daSong + "_Voices" + TitleState.soundExt);
|
||||
FlxG.sound.list.add(vocals);
|
||||
|
||||
FlxG.sound.playMusic('assets/music/' + daSong + TitleState.soundExt, 0.6);
|
||||
FlxG.sound.music.pause();
|
||||
vocals.pause();
|
||||
|
||||
FlxG.sound.music.onComplete = function()
|
||||
{
|
||||
vocals.pause();
|
||||
vocals.time = 0;
|
||||
FlxG.sound.music.pause();
|
||||
FlxG.sound.music.time = 0;
|
||||
};
|
||||
|
@ -430,6 +445,7 @@ class ChartingState extends MusicBeatState
|
|||
{
|
||||
PlayState.SONG = _song;
|
||||
FlxG.sound.music.stop();
|
||||
vocals.stop();
|
||||
FlxG.switchState(new PlayState());
|
||||
}
|
||||
|
||||
|
@ -440,9 +456,13 @@ class ChartingState extends MusicBeatState
|
|||
if (FlxG.sound.music.playing)
|
||||
{
|
||||
FlxG.sound.music.pause();
|
||||
vocals.pause();
|
||||
}
|
||||
else
|
||||
{
|
||||
vocals.play();
|
||||
FlxG.sound.music.play();
|
||||
}
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.R)
|
||||
|
@ -456,6 +476,7 @@ class ChartingState extends MusicBeatState
|
|||
if (FlxG.keys.pressed.W || FlxG.keys.pressed.S)
|
||||
{
|
||||
FlxG.sound.music.pause();
|
||||
vocals.pause();
|
||||
|
||||
var daTime:Float = 700 * FlxG.elapsed;
|
||||
|
||||
|
@ -465,6 +486,8 @@ class ChartingState extends MusicBeatState
|
|||
}
|
||||
else
|
||||
FlxG.sound.music.time += daTime;
|
||||
|
||||
vocals.time = FlxG.sound.music.time;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -497,6 +520,7 @@ class ChartingState extends MusicBeatState
|
|||
if (updateMusic)
|
||||
{
|
||||
FlxG.sound.music.pause();
|
||||
vocals.pause();
|
||||
|
||||
var daNum:Int = 0;
|
||||
var daLength:Int = 0;
|
||||
|
@ -507,6 +531,7 @@ class ChartingState extends MusicBeatState
|
|||
}
|
||||
|
||||
FlxG.sound.music.time = (daLength - (_song.notes[sec].lengthInSteps)) * Conductor.stepCrochet;
|
||||
vocals.time = FlxG.sound.music.time;
|
||||
updateCurStep();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,148 @@
|
|||
package;
|
||||
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxObject;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.effects.FlxFlicker;
|
||||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||
import flixel.tweens.FlxEase;
|
||||
import flixel.tweens.FlxTween;
|
||||
|
||||
class MainMenuState extends MusicBeatState
|
||||
{
|
||||
var curSelected:Int = 0;
|
||||
|
||||
var menuItems:FlxTypedGroup<FlxSprite>;
|
||||
|
||||
var optionShit:Array<String> = ['story mode', 'freeplay', 'donate'];
|
||||
|
||||
var magenta:FlxSprite;
|
||||
var camFollow:FlxObject;
|
||||
|
||||
override function create()
|
||||
{
|
||||
persistentUpdate = persistentDraw = true;
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(AssetPaths.menuBG__png);
|
||||
bg.scrollFactor.x = 0;
|
||||
bg.scrollFactor.y = 0.18;
|
||||
bg.setGraphicSize(Std.int(bg.width * 1.1));
|
||||
bg.updateHitbox();
|
||||
bg.screenCenter();
|
||||
bg.antialiasing = true;
|
||||
add(bg);
|
||||
|
||||
camFollow = new FlxObject(0, 0, 1, 1);
|
||||
add(camFollow);
|
||||
|
||||
magenta = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, 0xFFF44688);
|
||||
magenta.visible = false;
|
||||
add(magenta);
|
||||
magenta.scrollFactor.set();
|
||||
|
||||
menuItems = new FlxTypedGroup<FlxSprite>();
|
||||
add(menuItems);
|
||||
|
||||
var tex = FlxAtlasFrames.fromSparrow(AssetPaths.FNF_main_menu_assets__png, AssetPaths.FNF_main_menu_assets__xml);
|
||||
|
||||
for (i in 0...optionShit.length)
|
||||
{
|
||||
var menuItem:FlxSprite = new FlxSprite(0, 60 + (i * 160));
|
||||
menuItem.frames = tex;
|
||||
menuItem.animation.addByPrefix('idle', optionShit[i] + " basic", 24);
|
||||
menuItem.animation.addByPrefix('selected', optionShit[i] + " white", 24);
|
||||
menuItem.animation.play('idle');
|
||||
menuItem.ID = i;
|
||||
menuItem.screenCenter(X);
|
||||
menuItems.add(menuItem);
|
||||
menuItem.scrollFactor.set();
|
||||
menuItem.antialiasing = true;
|
||||
}
|
||||
|
||||
FlxG.camera.follow(camFollow, null, 0.06);
|
||||
|
||||
changeItem();
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
if (controls.UP_P)
|
||||
changeItem(-1);
|
||||
if (controls.DOWN_P)
|
||||
changeItem(1);
|
||||
|
||||
super.update(elapsed);
|
||||
|
||||
if (controls.ACCEPT)
|
||||
{
|
||||
if (optionShit[curSelected] == 'donate')
|
||||
{
|
||||
FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
|
||||
}
|
||||
else
|
||||
{
|
||||
FlxFlicker.flicker(magenta, 0, 0.40);
|
||||
|
||||
menuItems.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
if (curSelected != spr.ID)
|
||||
{
|
||||
FlxTween.tween(spr, {alpha: 0}, 0.4, {
|
||||
ease: FlxEase.quadOut,
|
||||
onComplete: function(twn:FlxTween)
|
||||
{
|
||||
spr.kill();
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
FlxFlicker.flicker(spr, 1, 0.06, false, false, function(flick:FlxFlicker)
|
||||
{
|
||||
var daChoice:String = optionShit[curSelected];
|
||||
|
||||
switch (daChoice)
|
||||
{
|
||||
case 'story mode':
|
||||
FlxG.switchState(new StoryMenuState());
|
||||
case 'freeplay':
|
||||
FlxG.switchState(new FreeplayState());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
menuItems.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
spr.screenCenter(X);
|
||||
});
|
||||
}
|
||||
|
||||
function changeItem(huh:Int = 0)
|
||||
{
|
||||
curSelected += huh;
|
||||
|
||||
if (curSelected >= menuItems.length)
|
||||
curSelected = 0;
|
||||
if (curSelected < 0)
|
||||
curSelected = menuItems.length - 1;
|
||||
|
||||
menuItems.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
spr.animation.play('idle');
|
||||
|
||||
if (spr.ID == curSelected)
|
||||
{
|
||||
spr.animation.play('selected');
|
||||
camFollow.setPosition(spr.getGraphicMidpoint().x, spr.getGraphicMidpoint().y);
|
||||
}
|
||||
|
||||
spr.updateHitbox();
|
||||
});
|
||||
}
|
||||
}
|
|
@ -728,6 +728,8 @@ class PlayState extends MusicBeatState
|
|||
if (storyPlaylist.length <= 0)
|
||||
{
|
||||
FlxG.switchState(new TitleState());
|
||||
|
||||
StoryMenuState.weekUnlocked[1] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -15,7 +15,9 @@ class StoryMenuState extends MusicBeatState
|
|||
var scoreText:FlxText;
|
||||
|
||||
var weekData:Array<Dynamic> = [['Tutorial', 'Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South', 'Monster']];
|
||||
var weekUnlocked:Array<Bool> = [true, false];
|
||||
|
||||
public static var weekUnlocked:Array<Bool> = [true, false];
|
||||
|
||||
var weekCharacters:Array<Dynamic> = [['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf']];
|
||||
var curWeek:Int = 0;
|
||||
|
||||
|
|
|
@ -28,6 +28,14 @@ class TitleState extends MusicBeatState
|
|||
var credTextShit:Alphabet;
|
||||
var textGroup:FlxGroup;
|
||||
|
||||
var wackyIntros:Array<Array<String>> = [
|
||||
['Shoutouts to tom fulp', 'lmao'], ["Ludum dare", "extraordinaire"], ['Cyberzone', 'coming soon'], ['love to thriftman', 'swag'],
|
||||
['ULTIMATE RHYTHM GAMING', 'probably'], ['DOPE ASS GAME', 'playstation magazine'], ['in loving memory of', 'henryeyes'], ['dancin', 'forever'],
|
||||
['Ritz dx', 'rest in peace'], ['rate five', 'do not blam'], ['rhythm gaming', 'ultimate'], ['game of the year', 'forever'],
|
||||
['you already know', 'we really out here'], ['rise and grind', 'love to luis'], ['like parappa', 'but cooler']];
|
||||
|
||||
var curWacky:Array<String> = [];
|
||||
|
||||
override public function create():Void
|
||||
{
|
||||
#if (!web)
|
||||
|
@ -36,12 +44,14 @@ class TitleState extends MusicBeatState
|
|||
|
||||
PlayerSettings.init();
|
||||
|
||||
curWacky = FlxG.random.getObject(wackyIntros);
|
||||
|
||||
// DEBUG BULLSHIT
|
||||
|
||||
super.create();
|
||||
|
||||
#if SKIP_TO_PLAYSTATE
|
||||
FlxG.switchState(new FreeplayState());
|
||||
FlxG.switchState(new MainMenuState());
|
||||
#else
|
||||
startIntro();
|
||||
#end
|
||||
|
@ -55,9 +65,9 @@ class TitleState extends MusicBeatState
|
|||
diamond.persist = true;
|
||||
diamond.destroyOnNoUse = false;
|
||||
|
||||
FlxTransitionableState.defaultTransIn = new TransitionData(FADE, FlxColor.BLACK, 2, new FlxPoint(0, -1), {asset: diamond, width: 32, height: 32},
|
||||
FlxTransitionableState.defaultTransIn = new TransitionData(FADE, FlxColor.BLACK, 1, new FlxPoint(0, -1), {asset: diamond, width: 32, height: 32},
|
||||
new FlxRect(0, 0, FlxG.width, FlxG.height));
|
||||
FlxTransitionableState.defaultTransOut = new TransitionData(FADE, FlxColor.BLACK, 1.3, new FlxPoint(0, 1),
|
||||
FlxTransitionableState.defaultTransOut = new TransitionData(FADE, FlxColor.BLACK, 0.7, new FlxPoint(0, 1),
|
||||
{asset: diamond, width: 32, height: 32}, new FlxRect(0, 0, FlxG.width, FlxG.height));
|
||||
|
||||
initialized = true;
|
||||
|
@ -108,7 +118,7 @@ class TitleState extends MusicBeatState
|
|||
|
||||
// credGroup.add(credTextShit);
|
||||
|
||||
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt, 0, false);
|
||||
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt, 0);
|
||||
|
||||
FlxG.sound.music.fadeIn(4, 0, 0.7);
|
||||
}
|
||||
|
@ -139,13 +149,13 @@ class TitleState extends MusicBeatState
|
|||
FlxG.camera.flash(FlxColor.WHITE, 1);
|
||||
|
||||
transitioning = true;
|
||||
FlxG.sound.music.stop();
|
||||
// FlxG.sound.music.stop();
|
||||
|
||||
new FlxTimer().start(2, function(tmr:FlxTimer)
|
||||
{
|
||||
FlxG.switchState(new StoryMenuState());
|
||||
FlxG.switchState(new MainMenuState());
|
||||
});
|
||||
FlxG.sound.play('assets/music/titleShoot' + TitleState.soundExt, 0.7);
|
||||
// FlxG.sound.play('assets/music/titleShoot' + TitleState.soundExt, 0.7);
|
||||
}
|
||||
|
||||
super.update(elapsed);
|
||||
|
@ -213,10 +223,10 @@ class TitleState extends MusicBeatState
|
|||
// credTextShit.text = 'Shoutouts Tom Fulp';
|
||||
// credTextShit.screenCenter();
|
||||
case 9:
|
||||
createCoolText(['Shoutouts Tom Fulp']);
|
||||
createCoolText([curWacky[0]]);
|
||||
// credTextShit.visible = true;
|
||||
case 11:
|
||||
addMoreText('lmao');
|
||||
addMoreText(curWacky[1]);
|
||||
// credTextShit.text += '\nlmao';
|
||||
case 12:
|
||||
deleteCoolText();
|
||||
|
|
Loading…
Reference in New Issue