1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-25 22:47:52 +00:00

freeplay sounds

This commit is contained in:
Cameron Taylor 2020-11-17 16:22:29 -08:00
parent e6c87f8fc3
commit 9135c5c595
4 changed files with 26 additions and 9 deletions

View file

@ -5,6 +5,9 @@ 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]
### Added
- Music playing on the freeplay menu.
- UI sounds on freeplay menu
### Changed
- Moved all the intro texts to its own txt file instead of being hardcoded, this allows for much easier customization. File is in the data folder, called "introText.txt", follow the format in there and you're probably good to go!
### Fixed

View file

@ -391,7 +391,7 @@ class ChartingState extends MusicBeatState
if (curBeat % 4 == 0)
{
if (curStep > lengthBpmBullshit() * (curSection + 1))
if (curStep > 16 * (curSection + 1))
{
trace(curStep);
trace((_song.notes[curSection].lengthInSteps) * (curSection + 1));
@ -406,6 +406,9 @@ class ChartingState extends MusicBeatState
}
}
FlxG.watch.addQuick('daBeat', curBeat);
FlxG.watch.addQuick('daStep', curStep);
if (FlxG.mouse.justPressed)
{
if (FlxG.mouse.overlaps(curRenderedNotes))
@ -699,7 +702,7 @@ class ChartingState extends MusicBeatState
private function addNote():Void
{
var noteStrum = getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * lengthBpmBullshit()));
var noteStrum = getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16));
var noteData = Math.floor(FlxG.mouse.x / GRID_SIZE);
var noteSus = 0;

View file

@ -24,14 +24,17 @@ class FreeplayState extends MusicBeatState
var intendedScore:Int = 0;
private var grpSongs:FlxTypedGroup<Alphabet>;
private var curPlaying:Bool = false;
override function create()
{
if (FlxG.sound.music != null)
{
if (!FlxG.sound.music.playing)
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);
}
/*
if (FlxG.sound.music != null)
{
if (!FlxG.sound.music.playing)
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);
}
*/
var isDebug:Bool = false;
@ -118,6 +121,11 @@ class FreeplayState extends MusicBeatState
{
super.update(elapsed);
if (FlxG.sound.music.volume < 0.7)
{
FlxG.sound.music.volume += 0.5 * FlxG.elapsed;
}
lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.4));
if (Math.abs(lerpScore - intendedScore) <= 10)
@ -187,7 +195,8 @@ class FreeplayState extends MusicBeatState
function changeSelection(change:Int = 0)
{
NGio.logEvent('Fresh');
// NGio.logEvent('Fresh');
FlxG.sound.play('assets/sounds/scrollMenu' + TitleState.soundExt, 0.4);
curSelected += change;
@ -201,6 +210,8 @@ class FreeplayState extends MusicBeatState
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
// lerpScore = 0;
FlxG.sound.playMusic('assets/music/' + songs[curSelected] + "_Inst" + TitleState.soundExt, 0);
var bullShit:Int = 0;
for (item in grpSongs.members)

View file

@ -68,7 +68,7 @@ class TitleState extends MusicBeatState
}
#if SKIP_TO_PLAYSTATE
FlxG.switchState(new ChartingState());
FlxG.switchState(new FreeplayState());
#else
startIntro();
#end