mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-02-05 11:08:20 +00:00
fix note miss bullshit
This commit is contained in:
parent
c5094754a9
commit
9b08561db8
|
@ -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>
|
||||
|
|
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue