freeplay sounds
This commit is contained in:
parent
433923bdbd
commit
1ed64e3fda
@ -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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
### Added
|
||||||
|
- Music playing on the freeplay menu.
|
||||||
|
- UI sounds on freeplay menu
|
||||||
### Changed
|
### 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!
|
- 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
|
### Fixed
|
||||||
|
@ -391,7 +391,7 @@ class ChartingState extends MusicBeatState
|
|||||||
|
|
||||||
if (curBeat % 4 == 0)
|
if (curBeat % 4 == 0)
|
||||||
{
|
{
|
||||||
if (curStep > lengthBpmBullshit() * (curSection + 1))
|
if (curStep > 16 * (curSection + 1))
|
||||||
{
|
{
|
||||||
trace(curStep);
|
trace(curStep);
|
||||||
trace((_song.notes[curSection].lengthInSteps) * (curSection + 1));
|
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.justPressed)
|
||||||
{
|
{
|
||||||
if (FlxG.mouse.overlaps(curRenderedNotes))
|
if (FlxG.mouse.overlaps(curRenderedNotes))
|
||||||
@ -699,7 +702,7 @@ class ChartingState extends MusicBeatState
|
|||||||
|
|
||||||
private function addNote():Void
|
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 noteData = Math.floor(FlxG.mouse.x / GRID_SIZE);
|
||||||
var noteSus = 0;
|
var noteSus = 0;
|
||||||
|
|
||||||
|
@ -24,14 +24,17 @@ class FreeplayState extends MusicBeatState
|
|||||||
var intendedScore:Int = 0;
|
var intendedScore:Int = 0;
|
||||||
|
|
||||||
private var grpSongs:FlxTypedGroup<Alphabet>;
|
private var grpSongs:FlxTypedGroup<Alphabet>;
|
||||||
|
private var curPlaying:Bool = false;
|
||||||
|
|
||||||
override function create()
|
override function create()
|
||||||
{
|
{
|
||||||
if (FlxG.sound.music != null)
|
/*
|
||||||
{
|
if (FlxG.sound.music != null)
|
||||||
if (!FlxG.sound.music.playing)
|
{
|
||||||
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);
|
if (!FlxG.sound.music.playing)
|
||||||
}
|
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
var isDebug:Bool = false;
|
var isDebug:Bool = false;
|
||||||
|
|
||||||
@ -118,6 +121,11 @@ class FreeplayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
super.update(elapsed);
|
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));
|
lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.4));
|
||||||
|
|
||||||
if (Math.abs(lerpScore - intendedScore) <= 10)
|
if (Math.abs(lerpScore - intendedScore) <= 10)
|
||||||
@ -187,7 +195,8 @@ class FreeplayState extends MusicBeatState
|
|||||||
|
|
||||||
function changeSelection(change:Int = 0)
|
function changeSelection(change:Int = 0)
|
||||||
{
|
{
|
||||||
NGio.logEvent('Fresh');
|
// NGio.logEvent('Fresh');
|
||||||
|
FlxG.sound.play('assets/sounds/scrollMenu' + TitleState.soundExt, 0.4);
|
||||||
|
|
||||||
curSelected += change;
|
curSelected += change;
|
||||||
|
|
||||||
@ -201,6 +210,8 @@ class FreeplayState extends MusicBeatState
|
|||||||
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
|
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
|
||||||
// lerpScore = 0;
|
// lerpScore = 0;
|
||||||
|
|
||||||
|
FlxG.sound.playMusic('assets/music/' + songs[curSelected] + "_Inst" + TitleState.soundExt, 0);
|
||||||
|
|
||||||
var bullShit:Int = 0;
|
var bullShit:Int = 0;
|
||||||
|
|
||||||
for (item in grpSongs.members)
|
for (item in grpSongs.members)
|
||||||
|
@ -68,7 +68,7 @@ class TitleState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if SKIP_TO_PLAYSTATE
|
#if SKIP_TO_PLAYSTATE
|
||||||
FlxG.switchState(new ChartingState());
|
FlxG.switchState(new FreeplayState());
|
||||||
#else
|
#else
|
||||||
startIntro();
|
startIntro();
|
||||||
#end
|
#end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user