fix note miss bullshit

This commit is contained in:
Cameron Taylor 2020-10-28 01:24:56 -07:00
parent 632e265f68
commit 842cb3dbe6
8 changed files with 47 additions and 17 deletions

View File

@ -92,4 +92,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" />
</project>

Binary file not shown.

View File

@ -0,0 +1,11 @@
package;
import flixel.FlxSubState;
class ButtonRemapSubstate extends FlxSubState
{
public function new()
{
super();
}
}

View File

@ -40,11 +40,16 @@ class FreeplayState extends MusicBeatState
override function update(elapsed:Float)
{
if (FlxG.keys.justPressed.UP)
super.update(elapsed);
var upP = controls.UP_P;
var downP = controls.DOWN_P;
var accepted = controls.ACCEPT;
if (upP)
{
curSelected -= 1;
}
if (FlxG.keys.justPressed.DOWN)
if (downP)
{
curSelected += 1;
}
@ -56,12 +61,10 @@ class FreeplayState extends MusicBeatState
selector.y = (70 * curSelected) + 30;
if (FlxG.keys.justPressed.ENTER)
if (accepted)
{
PlayState.SONG = Song.loadFromJson(songs[curSelected].toLowerCase());
FlxG.switchState(new PlayState());
}
super.update(elapsed);
}
}

View File

@ -9,7 +9,7 @@ class Main extends Sprite
public function new()
{
super();
addChild(new FlxGame(0, 0, FreeplayState));
addChild(new FlxGame(0, 0, TitleState));
#if !mobile
addChild(new FPS(10, 3, 0xFFFFFF));

View File

@ -15,6 +15,10 @@ class MusicBeatState extends FlxUIState
private var curStep:Int = 0;
private var curBeat:Int = 0;
private var controls(get, never):Controls;
inline function get_controls():Controls
return PlayerSettings.player1.controls;
override function create()
{

View File

@ -69,11 +69,6 @@ class PlayState extends MusicBeatState
private var camHUD:FlxCamera;
private var camGame:FlxCamera;
var controls(get, never):Controls;
inline function get_controls():Controls
return PlayerSettings.player1.controls;
override public function create()
{
// var gameCam:FlxCamera = FlxG.camera;
@ -86,8 +81,6 @@ class PlayState extends MusicBeatState
FlxCamera.defaultCameras = [camGame];
PlayerSettings.init();
persistentUpdate = true;
persistentDraw = true;
@ -1000,6 +993,7 @@ class PlayState extends MusicBeatState
combo = 0;
FlxG.sound.play('assets/sounds/missnote' + FlxG.random.int(1, 3) + TitleState.soundExt, FlxG.random.float(0.1, 0.2));
// FlxG.sound.play('assets/sounds/missnote1' + TitleState.soundExt, 1, false);
// FlxG.log.add('played imss note');
boyfriend.stunned = true;
@ -1122,11 +1116,15 @@ class PlayState extends MusicBeatState
override function stepHit()
{
if (vocals.time > Conductor.songPosition + Conductor.stepCrochet || vocals.time < Conductor.songPosition - Conductor.stepCrochet)
if (SONG.needsVoices)
{
vocals.pause();
vocals.time = Conductor.songPosition;
vocals.play();
if (vocals.time > Conductor.songPosition + Conductor.stepCrochet
|| vocals.time < Conductor.songPosition - Conductor.stepCrochet)
{
vocals.pause();
vocals.time = Conductor.songPosition;
vocals.play();
}
}
if (dad.curCharacter == 'spooky' && totalSteps % 4 == 2)

View File

@ -34,8 +34,21 @@ class TitleState extends MusicBeatState
TitleState.soundExt = '.ogg';
#end
PlayerSettings.init();
// DEBUG BULLSHIT
super.create();
#if SKIP_TO_PLAYSTATE
FlxG.switchState(new FreeplayState());
#else
startIntro();
#end
}
function startIntro()
{
if (!initialized)
{
var diamond:FlxGraphic = FlxGraphic.fromClass(GraphicTransTileDiamond);