From 4d7fc18fc4e2d87b62e23f8deb7b72158ef8e355 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 21 Oct 2020 17:22:12 -0700 Subject: [PATCH] FIXED up bullshit --- source/Controls.hx | 36 +----------------------------------- source/PauseSubState.hx | 7 +++++++ source/PlayState.hx | 2 +- 3 files changed, 9 insertions(+), 36 deletions(-) diff --git a/source/Controls.hx b/source/Controls.hx index a60a49da4..697082bd6 100644 --- a/source/Controls.hx +++ b/source/Controls.hx @@ -25,9 +25,6 @@ enum abstract Action(String) to String from String var LEFT_R = "left-release"; var RIGHT_R = "right-release"; var DOWN_R = "down-release"; - var JUMP = "jump"; - var JUMP_P = "jump-press"; - var JUMP_R = "jump-release"; var ACCEPT = "accept"; var BACK = "back"; var PAUSE = "pause"; @@ -51,7 +48,6 @@ enum Control LEFT; RIGHT; DOWN; - JUMP; RESET; ACCEPT; BACK; @@ -84,9 +80,6 @@ class Controls extends FlxActionSet var _leftR = new FlxActionDigital(Action.LEFT_R); var _rightR = new FlxActionDigital(Action.RIGHT_R); var _downR = new FlxActionDigital(Action.DOWN_R); - var _jump = new FlxActionDigital(Action.JUMP); - var _jumpP = new FlxActionDigital(Action.JUMP_P); - var _jumpR = new FlxActionDigital(Action.JUMP_R); var _accept = new FlxActionDigital(Action.ACCEPT); var _back = new FlxActionDigital(Action.BACK); var _pause = new FlxActionDigital(Action.PAUSE); @@ -140,7 +133,7 @@ class Controls extends FlxActionSet public var UP_R(get, never):Bool; inline function get_UP_R() - return _upP.check(); + return _upR.check(); public var LEFT_R(get, never):Bool; @@ -157,21 +150,6 @@ class Controls extends FlxActionSet inline function get_DOWN_R() return _downR.check(); - public var JUMP(get, never):Bool; - - inline function get_JUMP() - return _jump.check(); - - public var JUMP_P(get, never):Bool; - - inline function get_JUMP_P() - return _jumpP.check(); - - public var JUMP_R(get, never):Bool; - - inline function get_JUMP_R() - return _jumpR.check(); - public var ACCEPT(get, never):Bool; inline function get_ACCEPT() @@ -208,9 +186,6 @@ class Controls extends FlxActionSet add(_leftR); add(_rightR); add(_downR); - add(_jump); - add(_jumpP); - add(_jumpR); add(_accept); add(_back); add(_pause); @@ -261,7 +236,6 @@ class Controls extends FlxActionSet case DOWN: _down; case LEFT: _left; case RIGHT: _right; - case JUMP: _jump; case ACCEPT: _accept; case BACK: _back; case PAUSE: _pause; @@ -301,10 +275,6 @@ class Controls extends FlxActionSet func(_down, PRESSED); func(_downP, JUST_PRESSED); func(_downR, JUST_RELEASED); - case JUMP: - func(_jump, PRESSED); - func(_jumpP, JUST_PRESSED); - func(_jumpR, JUST_RELEASED); case ACCEPT: func(_accept, JUST_PRESSED); case BACK: @@ -432,7 +402,6 @@ class Controls extends FlxActionSet inline bindKeys(Control.DOWN, [S, FlxKey.DOWN]); inline bindKeys(Control.LEFT, [A, FlxKey.LEFT]); inline bindKeys(Control.RIGHT, [D, FlxKey.RIGHT]); - inline bindKeys(Control.JUMP, [Z, Y, FlxKey.UP]); inline bindKeys(Control.ACCEPT, [Z, SPACE]); inline bindKeys(Control.BACK, [X]); inline bindKeys(Control.PAUSE, [P, ENTER]); @@ -442,7 +411,6 @@ class Controls extends FlxActionSet inline bindKeys(Control.DOWN, [S]); inline bindKeys(Control.LEFT, [A]); inline bindKeys(Control.RIGHT, [D]); - inline bindKeys(Control.JUMP, [G, W, Z]); inline bindKeys(Control.ACCEPT, [G, Z]); inline bindKeys(Control.BACK, [H, X]); inline bindKeys(Control.PAUSE, [ONE]); @@ -452,7 +420,6 @@ class Controls extends FlxActionSet inline bindKeys(Control.DOWN, [FlxKey.DOWN]); inline bindKeys(Control.LEFT, [FlxKey.LEFT]); inline bindKeys(Control.RIGHT, [FlxKey.RIGHT]); - inline bindKeys(Control.JUMP, [O, FlxKey.UP]); inline bindKeys(Control.ACCEPT, [O]); inline bindKeys(Control.BACK, [P]); inline bindKeys(Control.PAUSE, [ENTER]); @@ -515,7 +482,6 @@ class Controls extends FlxActionSet Control.DOWN => [DPAD_DOWN, LEFT_STICK_DIGITAL_DOWN], Control.LEFT => [DPAD_LEFT, LEFT_STICK_DIGITAL_LEFT], Control.RIGHT => [DPAD_RIGHT, LEFT_STICK_DIGITAL_RIGHT], - Control.JUMP => [A], Control.PAUSE => [START], Control.RESET => [Y] ]); diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index 816eb7f54..faa64d36d 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -1,8 +1,10 @@ package; +import Controls.Control; import flixel.FlxG; import flixel.FlxSprite; import flixel.FlxSubState; +import flixel.input.keyboard.FlxKey; import flixel.util.FlxColor; class PauseSubState extends FlxSubState @@ -20,6 +22,11 @@ class PauseSubState extends FlxSubState { super.update(elapsed); + if (FlxG.keys.justPressed.J) + { + PlayerSettings.player1.controls.replaceBinding(Control.LEFT, Keys, FlxKey.J, null); + } + if (FlxG.keys.justPressed.ENTER) close(); } diff --git a/source/PlayState.hx b/source/PlayState.hx index 6650f7193..ee8660e6e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1053,7 +1053,7 @@ class PlayState extends MusicBeatState if (rightP) noteMiss(3); if (downP) - noteMiss(2); + noteMiss(1); } function noteCheck(keyP:Bool, note:Note):Void