more seamless storymode transitions

This commit is contained in:
Cameron Taylor 2021-02-12 01:20:20 -05:00
parent 3cae655bbd
commit 39651dea36
5 changed files with 29 additions and 22 deletions

View File

@ -5,8 +5,11 @@ 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).
## [unreleased]
### Changed
- Made the transitions between the story mode levels more seamless.
### Fixed
- Chart's and chart editor now support changeBPM, GOD BLESS MTH FOR THIS ONE I BEEN STRUGGLIN WIT THAT SINCE OCTOBER LMAO ([GOD BLESS MTH](https://github.com/ninjamuffin99/Funkin/pull/382))
- Antialiasing on the skyscraper lights
## [0.2.7] - 2021-02-02
### Added

View File

@ -3,6 +3,7 @@ package;
import flixel.FlxG;
import flixel.FlxObject;
import flixel.FlxSprite;
import flixel.addons.transition.FlxTransitionableState;
import flixel.effects.FlxFlicker;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.group.FlxGroup.FlxTypedGroup;
@ -32,6 +33,9 @@ class MainMenuState extends MusicBeatState
override function create()
{
transIn = FlxTransitionableState.defaultTransIn;
transOut = FlxTransitionableState.defaultTransOut;
if (!FlxG.sound.music.playing)
{
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);

View File

@ -4,6 +4,7 @@ import Controls.Control;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxSubState;
import flixel.addons.transition.FlxTransitionableState;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.input.keyboard.FlxKey;
import flixel.system.FlxSound;

View File

@ -211,6 +211,7 @@ class PlayState extends MusicBeatState
light.visible = false;
light.setGraphicSize(Std.int(light.width * 0.85));
light.updateHitbox();
light.antialiasing = true;
phillyCityLights.add(light);
}
@ -485,8 +486,6 @@ class PlayState extends MusicBeatState
defaultCamZoom = 0.9;
curStage = 'stage';
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic('assets/images/stageback.png');
// bg.setGraphicSize(Std.int(bg.width * 2.5));
// bg.updateHitbox();
bg.antialiasing = true;
bg.scrollFactor.set(0.9, 0.9);
bg.active = false;
@ -516,9 +515,7 @@ class PlayState extends MusicBeatState
{
case 'limo':
gfVersion = 'gf-car';
case 'mall':
gfVersion = 'gf-christmas';
case 'mallEvil':
case 'mall' | 'mallEvil':
gfVersion = 'gf-christmas';
case 'school':
gfVersion = 'gf-pixel';
@ -772,6 +769,7 @@ class PlayState extends MusicBeatState
senpaiEvil.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/senpaiCrazy.png', 'assets/images/weeb/senpaiCrazy.xml');
senpaiEvil.animation.addByPrefix('idle', 'Senpai Pre Explosion', 24, false);
senpaiEvil.setGraphicSize(Std.int(senpaiEvil.width * 6));
senpaiEvil.scrollFactor.set();
senpaiEvil.updateHitbox();
senpaiEvil.screenCenter();
@ -1158,9 +1156,12 @@ class PlayState extends MusicBeatState
babyArrow.updateHitbox();
babyArrow.scrollFactor.set();
babyArrow.y -= 10;
babyArrow.alpha = 0;
FlxTween.tween(babyArrow, {y: babyArrow.y + 10, alpha: 1}, 1, {ease: FlxEase.circOut, startDelay: 0.5 + (0.2 * i)});
if (!isStoryMode)
{
babyArrow.y -= 10;
babyArrow.alpha = 0;
FlxTween.tween(babyArrow, {y: babyArrow.y + 10, alpha: 1}, 1, {ease: FlxEase.circOut, startDelay: 0.5 + (0.2 * i)});
}
babyArrow.ID = i;
@ -1412,7 +1413,6 @@ class PlayState extends MusicBeatState
FlxG.watch.addQuick("beatShit", curBeat);
FlxG.watch.addQuick("stepShit", curStep);
if (curSong == 'Fresh')
{
switch (curBeat)
@ -1514,8 +1514,6 @@ class PlayState extends MusicBeatState
altAnim = '-alt';
}
trace("DA ALT THO?: " + SONG.notes[Math.floor(curStep / 16)].altAnim);
switch (Math.abs(daNote.noteData))
{
case 2:
@ -1592,6 +1590,9 @@ class PlayState extends MusicBeatState
{
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);
transIn = FlxTransitionableState.defaultTransIn;
transOut = FlxTransitionableState.defaultTransOut;
FlxG.switchState(new StoryMenuState());
// if ()
@ -1630,20 +1631,14 @@ class PlayState extends MusicBeatState
FlxG.sound.play('assets/sounds/Lights_Shut_off' + TitleState.soundExt);
}
if (SONG.song.toLowerCase() == 'senpai')
{
transIn = null;
transOut = null;
prevCamFollow = camFollow;
}
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
prevCamFollow = camFollow;
PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase() + difficulty, PlayState.storyPlaylist[0]);
FlxG.sound.music.stop();
FlxG.switchState(new PlayState());
transIn = FlxTransitionableState.defaultTransIn;
transOut = FlxTransitionableState.defaultTransOut;
}
}
else
@ -2237,8 +2232,8 @@ class PlayState extends MusicBeatState
Conductor.changeBPM(SONG.notes[Math.floor(curStep / 16)].bpm);
FlxG.log.add('CHANGED BPM!');
}
//else
//Conductor.changeBPM(SONG.bpm);
// else
// Conductor.changeBPM(SONG.bpm);
// Dad doesnt interupt his own notes
if (SONG.notes[Math.floor(curStep / 16)].mustHitSection)

View File

@ -2,6 +2,7 @@ package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.addons.transition.FlxTransitionableState;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.group.FlxGroup;
@ -69,6 +70,9 @@ class StoryMenuState extends MusicBeatState
override function create()
{
transIn = FlxTransitionableState.defaultTransIn;
transOut = FlxTransitionableState.defaultTransOut;
if (FlxG.sound.music != null)
{
if (!FlxG.sound.music.playing)