1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-10-27 18:05:09 +00:00

Merge pull request #2 from ninjamuffin99/master

merge changes 2
This commit is contained in:
Lotusotho 2020-12-15 01:18:31 +01:00 committed by GitHub
commit bf04d347bc
13 changed files with 354 additions and 92 deletions

10
.github/workflows/superlinter.yml vendored Normal file
View file

@ -0,0 +1,10 @@
name: learn-github-actions
on: [push]
jobs:
check-bats-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm install -g bats
- run: bats -v

View file

@ -4,7 +4,23 @@ All notable changes will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.2.3]
## [UNRELEASED]
### Fixed
- When pausing music at the start, it doesn't continue the song anyways. ([shoutouts gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/48))
- IDK i think backing out of song menu should play main menu songs again hehe ([shoutouts gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/48))
## [0.2.4] - 2020-12-11
### Added
- 3 NEW SONGS BY KAWAISPRITE. Pico, Philly, and Blammed.
- NEW CHARACTER, PICO. Based off the classic Flash game "Pico's School" by Tom Fulp
- NEW LEVEL WOW! PHILLY BABEEEE
### Changed
- Made it less punishing to ATTEMPT to hit a note and miss, rather than let it pass you
### Fixed
- Song desync of you paused and unpaused frequently ([shoutouts SonicBlam](https://github.com/ninjamuffin99/Funkin/issues/37))
- Animation offsets when GF is scared
## [0.2.3] - 2020-12-04
### Added
- More intro texts
### Fixed

View file

@ -2,7 +2,7 @@
<project>
<!-- _________________________ Application Settings _________________________ -->
<app title="Friday Night Funkin" file="Funkin" packageName="com.ninjamuffin99.funkin" main="Main" version="0.2.2" company="ninjamuffin99" />
<app title="Friday Night Funkin" file="Funkin" packageName="com.ninjamuffin99.funkin" main="Main" version="0.2.4.1" company="ninjamuffin99" />
<!--Switch Export with Unique ApplicationID and Icon-->
<set name="APP_ID" value="0x0100f6c013bbc000" />

View file

@ -14,43 +14,6 @@ class Boyfriend extends Character
public function new(x:Float, y:Float)
{
super(x, y);
var tex = FlxAtlasFrames.fromSparrow(AssetPaths.BOYFRIEND__png, AssetPaths.BOYFRIEND__xml);
frames = tex;
animation.addByPrefix('idle', 'BF idle dance', 24, false);
animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false);
animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false);
animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false);
animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false);
animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false);
animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false);
animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false);
animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false);
animation.addByPrefix('hey', 'BF HEY', 24, false);
animation.addByPrefix('firstDeath', "BF dies", 24, false);
animation.addByPrefix('deathLoop', "BF Dead Loop", 24, true);
animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false);
animation.addByPrefix('scared', 'BF idle shaking', 24);
playAnim('idle');
antialiasing = true;
addOffset('idle', -5);
addOffset("singUP", -29, 27);
addOffset("singRIGHT", -38, -7);
addOffset("singLEFT", 12, -6);
addOffset("singDOWN", -10, -50);
addOffset("singUPmiss", -29, 27);
addOffset("singRIGHTmiss", -30, 21);
addOffset("singLEFTmiss", 12, 24);
addOffset("singDOWNmiss", -11, -19);
addOffset("hey", 7, 4);
addOffset('firstDeath', 37, 11);
addOffset('deathLoop', 37, 5);
addOffset('deathConfirm', 37, 69);
addOffset('scared', -4);
}
override function update(elapsed:Float)

View file

@ -1,6 +1,7 @@
package;
import flixel.FlxSprite;
import flixel.animation.FlxBaseAnimation;
import flixel.graphics.frames.FlxAtlasFrames;
using StringTools;
@ -40,7 +41,8 @@ class Character extends FlxSprite
animation.addByIndices('sad', 'gf sad', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "", 24, false);
animation.addByIndices('danceLeft', 'GF Dancing Beat', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
animation.addByIndices('danceRight', 'GF Dancing Beat', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
animation.addByIndices('hairBlow', "GF Dancing Beat Hair blowing", [0, 1, 2, 3], "", 24);
animation.addByIndices('hairFall', "GF Dancing Beat Hair Landing", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "", 24, false);
animation.addByPrefix('scared', 'GF FEAR', 24);
addOffset('cheer');
@ -52,8 +54,10 @@ class Character extends FlxSprite
addOffset("singRIGHT", 0, -20);
addOffset("singLEFT", 0, -19);
addOffset("singDOWN", 0, -20);
addOffset('hairBlow', 45, -8);
addOffset('hairFall', 0, -9);
addOffset('scared');
addOffset('scared', -2, -17);
playAnim('danceRight');
@ -107,21 +111,82 @@ class Character extends FlxSprite
addOffset("singLEFT", -30);
addOffset("singDOWN", -30, -40);
playAnim('idle');
case 'lucky':
tex = FlxAtlasFrames.fromSparrow(AssetPaths.lucky_guitar_assets__png, AssetPaths.lucky_guitar_assets__xml);
case 'pico':
tex = FlxAtlasFrames.fromSparrow(AssetPaths.Pico_FNF_assetss__png, AssetPaths.Pico_FNF_assetss__xml);
frames = tex;
animation.addByPrefix('idle', 'lucky guitar idle', 24, false);
animation.addByPrefix('singUP', 'lucky UP NOTE', 24, false);
animation.addByPrefix('singRIGHT', 'lucky sing right', 24, false);
animation.addByPrefix('singDOWN', 'lucky DOWN note', 24, false);
animation.addByPrefix('singLEFT', 'lucky sing left', 24, false);
animation.addByPrefix('idle', "Pico Idle Dance", 24);
animation.addByPrefix('singUP', 'pico Up note0', 24, false);
animation.addByPrefix('singDOWN', 'Pico Down Note0', 24, false);
if (isPlayer)
{
animation.addByPrefix('singLEFT', 'Pico NOTE LEFT0', 24, false);
animation.addByPrefix('singRIGHT', 'Pico Note Right0', 24, false);
animation.addByPrefix('singRIGHTmiss', 'Pico Note Right Miss', 24, false);
animation.addByPrefix('singLEFTmiss', 'Pico NOTE LEFT miss', 24, false);
}
else
{
// Need to be flipped! REDO THIS LATER!
animation.addByPrefix('singLEFT', 'Pico Note Right0', 24, false);
animation.addByPrefix('singRIGHT', 'Pico NOTE LEFT0', 24, false);
animation.addByPrefix('singRIGHTmiss', 'Pico NOTE LEFT miss', 24, false);
animation.addByPrefix('singLEFTmiss', 'Pico Note Right Miss', 24, false);
}
animation.addByPrefix('singUPmiss', 'pico Up note miss', 24);
animation.addByPrefix('singDOWNmiss', 'Pico Down Note MISS', 24);
addOffset('idle', 0, -180);
addOffset("singUP", 200, -180);
addOffset("singRIGHT", 200, -180);
addOffset("singLEFT", 200, -180);
addOffset("singDOWN", 200, -180);
playAnim('idle');
addOffset('idle');
addOffset("singUP", -29, 27);
addOffset("singRIGHT", -68, -7);
addOffset("singLEFT", 65, 9);
addOffset("singDOWN", 200, -70);
addOffset("singUPmiss", -19, 67);
addOffset("singRIGHTmiss", -60, 41);
addOffset("singLEFTmiss", 62, 64);
addOffset("singDOWNmiss", 210, -28);
if (!isPlayer)
flipX = true;
case 'bf':
var tex = FlxAtlasFrames.fromSparrow(AssetPaths.BOYFRIEND__png, AssetPaths.BOYFRIEND__xml);
frames = tex;
animation.addByPrefix('idle', 'BF idle dance', 24, false);
animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false);
animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false);
animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false);
animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false);
animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false);
animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false);
animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false);
animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false);
animation.addByPrefix('hey', 'BF HEY', 24, false);
animation.addByPrefix('firstDeath', "BF dies", 24, false);
animation.addByPrefix('deathLoop', "BF Dead Loop", 24, true);
animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false);
animation.addByPrefix('scared', 'BF idle shaking', 24);
playAnim('idle');
antialiasing = true;
addOffset('idle', -5);
addOffset("singUP", -29, 27);
addOffset("singRIGHT", -38, -7);
addOffset("singLEFT", 12, -6);
addOffset("singDOWN", -10, -50);
addOffset("singUPmiss", -29, 27);
addOffset("singRIGHTmiss", -30, 21);
addOffset("singLEFTmiss", 12, 24);
addOffset("singDOWNmiss", -11, -19);
addOffset("hey", 7, 4);
addOffset('firstDeath', 37, 11);
addOffset('deathLoop', 37, 5);
addOffset('deathConfirm', 37, 69);
addOffset('scared', -4);
}
}
@ -145,6 +210,13 @@ class Character extends FlxSprite
}
}
switch (curCharacter)
{
case 'gf':
if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished)
playAnim('danceRight');
}
super.update(elapsed);
}
@ -160,12 +232,16 @@ class Character extends FlxSprite
case 'bf':
case 'gf':
danced = !danced;
if (!animation.curAnim.name.startsWith('hair'))
{
danced = !danced;
if (danced)
playAnim('danceRight');
else
playAnim('danceLeft');
}
if (danced)
playAnim('danceRight');
else
playAnim('danceLeft');
case 'spooky':
danced = !danced;
@ -177,7 +253,7 @@ class Character extends FlxSprite
playAnim('idle');
case 'monster':
playAnim('idle');
case 'lucky':
case 'pico':
playAnim('idle');
}
}

View file

@ -183,7 +183,7 @@ class ChartingState extends MusicBeatState
stepperBPM.value = Conductor.bpm;
stepperBPM.name = 'song_bpm';
var characters:Array<String> = ["bf", 'dad', 'gf', 'spooky', 'monster'];
var characters:Array<String> = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico'];
var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String)
{
@ -514,12 +514,19 @@ class ChartingState extends MusicBeatState
if (FlxG.keys.justPressed.DOWN)
Conductor.changeBPM(Conductor.bpm - 1); */
var shiftThing:Int = 1;
if (FlxG.keys.pressed.SHIFT)
shiftThing = 4;
if (FlxG.keys.justPressed.RIGHT)
changeSection(curSection + 1);
changeSection(curSection + shiftThing);
if (FlxG.keys.justPressed.LEFT)
changeSection(curSection - 1);
changeSection(curSection - shiftThing);
bpmTxt.text = "BPM: " + Conductor.bpm + "\nSection: " + curSection;
bpmTxt.text = bpmTxt.text = Std.string(FlxMath.roundDecimal(Conductor.songPosition / 1000, 2))
+ " / "
+ Std.string(FlxMath.roundDecimal(FlxG.sound.music.length / 1000, 2))
+ "\nSection: "
+ curSection;
super.update(elapsed);
}

View file

@ -48,6 +48,13 @@ class FreeplayState extends MusicBeatState
songs.push('South');
}
if (StoryMenuState.weekUnlocked[3] || isDebug)
{
songs.push('Pico');
songs.push('Philly');
songs.push('Blammed');
}
// LOAD MUSIC
// LOAD CHARACTERS

View file

@ -29,6 +29,11 @@ class MainMenuState extends MusicBeatState
override function create()
{
if (!FlxG.sound.music.playing)
{
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);
}
persistentUpdate = persistentDraw = true;
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(AssetPaths.menuBG__png);
@ -76,7 +81,7 @@ class MainMenuState extends MusicBeatState
FlxG.camera.follow(camFollow, null, 0.06);
var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, "v" + Application.current.meta.get('version'));
var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, "v" + Application.current.meta.get('version'), 12);
versionShit.scrollFactor.set();
versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
add(versionShit);
@ -90,6 +95,11 @@ class MainMenuState extends MusicBeatState
override function update(elapsed:Float)
{
if (FlxG.sound.music.volume < 0.8)
{
FlxG.sound.music.volume += 0.5 * FlxG.elapsed;
}
if (!selectedSomethin)
{
if (controls.UP_P)
@ -114,12 +124,10 @@ class MainMenuState extends MusicBeatState
if (optionShit[curSelected] == 'donate')
{
#if linux
Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
#else
FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
#end
}
else
{

View file

@ -21,6 +21,7 @@ class MenuCharacter extends FlxSprite
animation.addByPrefix('gf', "GF Dancing Beat WHITE", 24);
animation.addByPrefix('dad', "Dad idle dance BLACK LINE", 24);
animation.addByPrefix('spooky', "spooky dance idle BLACK LINES", 24);
animation.addByPrefix('pico', "Pico Idle Dance", 24);
animation.play(character);
updateHitbox();

View file

@ -22,6 +22,7 @@ class MenuItem extends FlxSpriteGroup
week.animation.addByPrefix('week0', 'tutorial selected', 24);
week.animation.addByPrefix('week1', "WEEK1 select", 24);
week.animation.addByPrefix('week2', "week2 select", 24);
week.animation.addByPrefix('week3', "Week 3 press", 24);
add(week);
week.animation.play('week' + weekNum);

View file

@ -35,6 +35,7 @@ using StringTools;
class PlayState extends MusicBeatState
{
public static var curLevel:String = 'Tutorial';
public static var curStage:String = '';
public static var SONG:SwagSong;
public static var isStoryMode:Bool = false;
public static var storyWeek:Int = 0;
@ -81,6 +82,10 @@ class PlayState extends MusicBeatState
var halloweenBG:FlxSprite;
var isHalloween:Bool = false;
var phillyCityLights:FlxTypedGroup<FlxSprite>;
var phillyTrain:FlxSprite;
var trainSound:FlxSound;
var talking:Bool = true;
var songScore:Int = 0;
var scoreTxt:FlxText;
@ -144,6 +149,47 @@ class PlayState extends MusicBeatState
isHalloween = true;
}
else if (SONG.song.toLowerCase() == 'pico' || SONG.song.toLowerCase() == 'blammed' || SONG.song.toLowerCase() == 'philly')
{
curStage = 'philly';
var bg:FlxSprite = new FlxSprite(-100).loadGraphic(AssetPaths.sky__png);
bg.scrollFactor.set(0.1, 0.1);
add(bg);
var city:FlxSprite = new FlxSprite(-10).loadGraphic(AssetPaths.city__png);
city.scrollFactor.set(0.3, 0.3);
city.setGraphicSize(Std.int(city.width * 0.85));
city.updateHitbox();
add(city);
phillyCityLights = new FlxTypedGroup<FlxSprite>();
add(phillyCityLights);
for (i in 0...5)
{
var light:FlxSprite = new FlxSprite(city.x).loadGraphic('assets/images/philly/win' + i + '.png');
light.scrollFactor.set(0.3, 0.3);
light.visible = false;
light.setGraphicSize(Std.int(light.width * 0.85));
light.updateHitbox();
phillyCityLights.add(light);
}
var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(AssetPaths.behindTrain__png);
add(streetBehind);
phillyTrain = new FlxSprite(2000, 360).loadGraphic(AssetPaths.train__png);
add(phillyTrain);
trainSound = new FlxSound().loadEmbedded('assets/sounds/train_passes' + TitleState.soundExt);
FlxG.sound.list.add(trainSound);
// var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0__png);
var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(AssetPaths.street__png);
add(street);
}
else
{
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png);
@ -199,6 +245,9 @@ class PlayState extends MusicBeatState
dad.y += 100;
case 'dad':
camPos.x += 400;
case 'pico':
camPos.x += 600;
dad.y += 300;
}
boyfriend = new Boyfriend(770, 450);
@ -376,11 +425,13 @@ class PlayState extends MusicBeatState
function startSong():Void
{
startingSong = false;
previousFrameTime = FlxG.game.ticks;
lastReportedPlayheadPosition = 0;
startingSong = false;
FlxG.sound.playMusic("assets/music/" + SONG.song + "_Inst" + TitleState.soundExt, 1, false);
if (!paused)
FlxG.sound.playMusic("assets/music/" + SONG.song + "_Inst" + TitleState.soundExt, 1, false);
FlxG.sound.music.onComplete = endSong;
vocals.play();
}
@ -574,12 +625,9 @@ class PlayState extends MusicBeatState
{
if (paused)
{
if (FlxG.sound.music != null)
if (FlxG.sound.music != null && !startingSong)
{
vocals.time = Conductor.songPosition;
FlxG.sound.music.play();
vocals.play();
resyncVocals();
}
if (!startTimer.finished)
@ -590,12 +638,39 @@ class PlayState extends MusicBeatState
super.closeSubState();
}
function resyncVocals():Void
{
vocals.pause();
FlxG.sound.music.play();
Conductor.songPosition = FlxG.sound.music.time;
vocals.time = Conductor.songPosition;
vocals.play();
}
private var paused:Bool = false;
var startedCountdown:Bool = false;
var canPause:Bool = true;
override public function update(elapsed:Float)
{
switch (curStage)
{
case 'philly':
if (trainMoving)
{
trainFrameTiming += elapsed;
if (trainFrameTiming >= 1 / 24)
{
updateTrainPos();
trainFrameTiming = 0;
}
}
// phillyCityLights.members[curLight].alpha -= (Conductor.crochet / 1000) * FlxG.elapsed;
}
super.update(elapsed);
scoreTxt.text = "Score:" + songScore;
@ -634,7 +709,7 @@ class PlayState extends MusicBeatState
#if debug
if (FlxG.keys.justPressed.EIGHT)
FlxG.switchState(new AnimationDebug(SONG.player1));
FlxG.switchState(new AnimationDebug(SONG.player2));
#end
if (startingSong)
@ -731,7 +806,8 @@ class PlayState extends MusicBeatState
{
switch (totalBeats)
{
case 127:
case 128, 129, 130:
vocals.volume = 0;
// FlxG.sound.music.stop();
// curLevel = 'Fresh';
// FlxG.switchState(new PlayState());
@ -832,7 +908,7 @@ class PlayState extends MusicBeatState
{
if (daNote.tooLate || !daNote.wasGoodHit)
{
health -= 0.04;
health -= 0.045;
vocals.volume = 0;
}
@ -873,7 +949,7 @@ class PlayState extends MusicBeatState
FlxG.switchState(new StoryMenuState());
// if ()
StoryMenuState.weekUnlocked[2] = true;
StoryMenuState.weekUnlocked[Std.int(Math.min(storyWeek + 1, StoryMenuState.weekUnlocked.length - 1))] = true;
if (SONG.validScore)
{
@ -1176,7 +1252,7 @@ class PlayState extends MusicBeatState
{
if (!boyfriend.stunned)
{
health -= 0.06;
health -= 0.035;
if (combo > 5)
{
gf.playAnim('sad');
@ -1306,6 +1382,60 @@ class PlayState extends MusicBeatState
}
}
var trainMoving:Bool = false;
var trainFrameTiming:Float = 0;
var trainCars:Int = 8;
var trainFinishing:Bool = false;
var trainCooldown:Int = 0;
function trainStart():Void
{
trainMoving = true;
if (!trainSound.playing)
trainSound.play(true);
}
var startedMoving:Bool = false;
function updateTrainPos():Void
{
if (trainSound.time >= 4700)
{
startedMoving = true;
gf.playAnim('hairBlow');
}
if (startedMoving)
{
phillyTrain.x -= 400;
if (phillyTrain.x < -2000 && !trainFinishing)
{
phillyTrain.x = -1150;
trainCars -= 1;
if (trainCars <= 0)
trainFinishing = true;
}
if (phillyTrain.x < -4000 && trainFinishing)
trainReset();
}
}
function trainReset():Void
{
gf.playAnim('hairFall');
phillyTrain.x = FlxG.width + 200;
trainMoving = false;
// trainSound.stop();
// trainSound.time = 0;
trainCars = 8;
trainFinishing = false;
startedMoving = false;
}
function lightningStrikeShit():Void
{
FlxG.sound.play('assets/sounds/thunder_' + FlxG.random.int(1, 2) + TitleState.soundExt);
@ -1322,12 +1452,9 @@ class PlayState extends MusicBeatState
{
if (SONG.needsVoices)
{
if (vocals.time > Conductor.songPosition + Conductor.stepCrochet
|| vocals.time < Conductor.songPosition - Conductor.stepCrochet)
if (vocals.time > Conductor.songPosition + 20 || vocals.time < Conductor.songPosition - 20)
{
vocals.pause();
vocals.time = Conductor.songPosition;
vocals.play();
resyncVocals();
}
}
@ -1394,9 +1521,37 @@ class PlayState extends MusicBeatState
}
}
switch (curStage)
{
case "philly":
if (!trainMoving)
trainCooldown += 1;
if (totalBeats % 4 == 0)
{
phillyCityLights.forEach(function(light:FlxSprite)
{
light.visible = false;
});
curLight = FlxG.random.int(0, phillyCityLights.length - 1);
phillyCityLights.members[curLight].visible = true;
// phillyCityLights.members[curLight].alpha = 1;
}
if (totalBeats % 8 == 4 && FlxG.random.bool(30) && !trainMoving && trainCooldown > 8)
{
trainCooldown = FlxG.random.int(-4, 0);
trainStart();
}
}
if (isHalloween && FlxG.random.bool(10) && curBeat > lightningStrikeBeat + lightningOffset)
{
lightningStrikeShit();
}
}
var curLight:Int = 0;
}

View file

@ -17,12 +17,22 @@ class StoryMenuState extends MusicBeatState
{
var scoreText:FlxText;
var weekData:Array<Dynamic> = [['Tutorial'], ['Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South']];
var weekData:Array<Dynamic> = [
['Tutorial'],
['Bopeebo', 'Fresh', 'Dadbattle'],
['Spookeez', 'South'],
['Pico', 'Philly', "Blammed"]
];
var curDifficulty:Int = 1;
public static var weekUnlocked:Array<Bool> = [true, true, false];
public static var weekUnlocked:Array<Bool> = [true, true, false, false];
var weekCharacters:Array<Dynamic> = [['dad', 'bf', 'gf'], ['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf']];
var weekCharacters:Array<Dynamic> = [
['dad', 'bf', 'gf'],
['dad', 'bf', 'gf'],
['spooky', 'bf', 'gf'],
['pico', 'bf', 'gf']
];
var curWeek:Int = 0;
var txtTracklist:FlxText;
@ -113,6 +123,10 @@ class StoryMenuState extends MusicBeatState
case 'gf':
weekCharacterThing.setGraphicSize(Std.int(weekCharacterThing.width * 0.5));
weekCharacterThing.updateHitbox();
case 'pico':
weekCharacterThing.y += 170;
weekCharacterThing.flipX = true;
weekCharacterThing.x -= 40;
}
grpWeekCharacters.add(weekCharacterThing);
@ -231,11 +245,12 @@ class StoryMenuState extends MusicBeatState
var movedBack:Bool = false;
var selectedWeek:Bool = false;
var stopspamming:Bool = false;
function selectWeek()
{
if (weekUnlocked[curWeek])
{
if (stopspamming == false)
if (stopspamming == false)
{
FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt);
@ -356,10 +371,9 @@ class StoryMenuState extends MusicBeatState
txtTracklist.screenCenter(X);
txtTracklist.x -= FlxG.width * 0.35;
#if !switch
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
#end
}
}

View file

@ -64,12 +64,16 @@ class TitleState extends MusicBeatState
{
StoryMenuState.weekUnlocked = FlxG.save.data.weekUnlocked;
if (StoryMenuState.weekUnlocked.length < 3)
if (StoryMenuState.weekUnlocked.length < 4)
StoryMenuState.weekUnlocked.insert(0, true);
// QUICK PATCH OOPS!
if (!StoryMenuState.weekUnlocked[0])
StoryMenuState.weekUnlocked[0] = true;
}
#if SKIP_TO_PLAYSTATE
FlxG.switchState(new ChartingState());
FlxG.switchState(new StoryMenuState());
#else
startIntro();
#end