fix note miss bullshit
This commit is contained in:
parent
c2d1b86c98
commit
c8e3a27044
@ -92,4 +92,5 @@
|
|||||||
|
|
||||||
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
||||||
<icon path="art/icon.png"/>
|
<icon path="art/icon.png"/>
|
||||||
|
<haxedef name="SKIP_TO_PLAYSTATE" if="debug" />
|
||||||
</project>
|
</project>
|
||||||
|
Binary file not shown.
11
source/ButtonRemapSubstate.hx
Normal file
11
source/ButtonRemapSubstate.hx
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package;
|
||||||
|
|
||||||
|
import flixel.FlxSubState;
|
||||||
|
|
||||||
|
class ButtonRemapSubstate extends FlxSubState
|
||||||
|
{
|
||||||
|
public function new()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
@ -40,11 +40,16 @@ class FreeplayState extends MusicBeatState
|
|||||||
|
|
||||||
override function update(elapsed:Float)
|
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;
|
curSelected -= 1;
|
||||||
}
|
}
|
||||||
if (FlxG.keys.justPressed.DOWN)
|
if (downP)
|
||||||
{
|
{
|
||||||
curSelected += 1;
|
curSelected += 1;
|
||||||
}
|
}
|
||||||
@ -56,12 +61,10 @@ class FreeplayState extends MusicBeatState
|
|||||||
|
|
||||||
selector.y = (70 * curSelected) + 30;
|
selector.y = (70 * curSelected) + 30;
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.ENTER)
|
if (accepted)
|
||||||
{
|
{
|
||||||
PlayState.SONG = Song.loadFromJson(songs[curSelected].toLowerCase());
|
PlayState.SONG = Song.loadFromJson(songs[curSelected].toLowerCase());
|
||||||
FlxG.switchState(new PlayState());
|
FlxG.switchState(new PlayState());
|
||||||
}
|
}
|
||||||
|
|
||||||
super.update(elapsed);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ class Main extends Sprite
|
|||||||
public function new()
|
public function new()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
addChild(new FlxGame(0, 0, FreeplayState));
|
addChild(new FlxGame(0, 0, TitleState));
|
||||||
|
|
||||||
#if !mobile
|
#if !mobile
|
||||||
addChild(new FPS(10, 3, 0xFFFFFF));
|
addChild(new FPS(10, 3, 0xFFFFFF));
|
||||||
|
@ -15,6 +15,10 @@ class MusicBeatState extends FlxUIState
|
|||||||
|
|
||||||
private var curStep:Int = 0;
|
private var curStep:Int = 0;
|
||||||
private var curBeat: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()
|
override function create()
|
||||||
{
|
{
|
||||||
|
@ -69,11 +69,6 @@ class PlayState extends MusicBeatState
|
|||||||
private var camHUD:FlxCamera;
|
private var camHUD:FlxCamera;
|
||||||
private var camGame:FlxCamera;
|
private var camGame:FlxCamera;
|
||||||
|
|
||||||
var controls(get, never):Controls;
|
|
||||||
|
|
||||||
inline function get_controls():Controls
|
|
||||||
return PlayerSettings.player1.controls;
|
|
||||||
|
|
||||||
override public function create()
|
override public function create()
|
||||||
{
|
{
|
||||||
// var gameCam:FlxCamera = FlxG.camera;
|
// var gameCam:FlxCamera = FlxG.camera;
|
||||||
@ -86,8 +81,6 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
FlxCamera.defaultCameras = [camGame];
|
FlxCamera.defaultCameras = [camGame];
|
||||||
|
|
||||||
PlayerSettings.init();
|
|
||||||
|
|
||||||
persistentUpdate = true;
|
persistentUpdate = true;
|
||||||
persistentDraw = true;
|
persistentDraw = true;
|
||||||
|
|
||||||
@ -1000,6 +993,7 @@ class PlayState extends MusicBeatState
|
|||||||
combo = 0;
|
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/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');
|
// FlxG.log.add('played imss note');
|
||||||
|
|
||||||
boyfriend.stunned = true;
|
boyfriend.stunned = true;
|
||||||
@ -1122,11 +1116,15 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
override function stepHit()
|
override function stepHit()
|
||||||
{
|
{
|
||||||
if (vocals.time > Conductor.songPosition + Conductor.stepCrochet || vocals.time < Conductor.songPosition - Conductor.stepCrochet)
|
if (SONG.needsVoices)
|
||||||
{
|
{
|
||||||
vocals.pause();
|
if (vocals.time > Conductor.songPosition + Conductor.stepCrochet
|
||||||
vocals.time = Conductor.songPosition;
|
|| vocals.time < Conductor.songPosition - Conductor.stepCrochet)
|
||||||
vocals.play();
|
{
|
||||||
|
vocals.pause();
|
||||||
|
vocals.time = Conductor.songPosition;
|
||||||
|
vocals.play();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dad.curCharacter == 'spooky' && totalSteps % 4 == 2)
|
if (dad.curCharacter == 'spooky' && totalSteps % 4 == 2)
|
||||||
|
@ -34,8 +34,21 @@ class TitleState extends MusicBeatState
|
|||||||
TitleState.soundExt = '.ogg';
|
TitleState.soundExt = '.ogg';
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
PlayerSettings.init();
|
||||||
|
|
||||||
|
// DEBUG BULLSHIT
|
||||||
|
|
||||||
super.create();
|
super.create();
|
||||||
|
|
||||||
|
#if SKIP_TO_PLAYSTATE
|
||||||
|
FlxG.switchState(new FreeplayState());
|
||||||
|
#else
|
||||||
|
startIntro();
|
||||||
|
#end
|
||||||
|
}
|
||||||
|
|
||||||
|
function startIntro()
|
||||||
|
{
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
{
|
{
|
||||||
var diamond:FlxGraphic = FlxGraphic.fromClass(GraphicTransTileDiamond);
|
var diamond:FlxGraphic = FlxGraphic.fromClass(GraphicTransTileDiamond);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user