controls NOTE_LEFT
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
426
|
||||
429
|
||||
@@ -1281,9 +1281,9 @@ class PlayState extends MusicBeatState
|
||||
private function keyShit():Void
|
||||
{
|
||||
// HOLDING
|
||||
var pressed = [controls.LEFT, controls.DOWN, controls.UP, controls.RIGHT];
|
||||
var justPressed = [controls.LEFT_P, controls.DOWN_P, controls.UP_P, controls.RIGHT_P];
|
||||
var justReleased = [controls.LEFT_R, controls.DOWN_R, controls.UP_R, controls.RIGHT_R];
|
||||
var pressed = [controls.NOTE_LEFT, controls.NOTE_DOWN, controls.NOTE_UP, controls.NOTE_RIGHT];
|
||||
var justPressed = [controls.NOTE_LEFT_P, controls.NOTE_DOWN_P, controls.NOTE_UP_P, controls.NOTE_RIGHT_P];
|
||||
var justReleased = [controls.NOTE_LEFT_R, controls.NOTE_DOWN_R, controls.NOTE_UP_R, controls.NOTE_RIGHT_R];
|
||||
|
||||
var event = scripts.event("onKeyShit", new InputSystemEvent([controls.LEFT, controls.DOWN, controls.UP, controls.RIGHT], [controls.LEFT_P, controls.DOWN_P, controls.UP_P, controls.RIGHT_P], [controls.LEFT_R, controls.DOWN_R, controls.UP_R, controls.RIGHT_R]));
|
||||
if (event.cancelled) return;
|
||||
|
||||
@@ -22,6 +22,10 @@ class Options
|
||||
/**
|
||||
* PLAYER 1 CONTROLS
|
||||
*/
|
||||
public static var P1_NOTE_LEFT:Array<FlxKey> = [A];
|
||||
public static var P1_NOTE_DOWN:Array<FlxKey> = [S];
|
||||
public static var P1_NOTE_UP:Array<FlxKey> = [W];
|
||||
public static var P1_NOTE_RIGHT:Array<FlxKey> = [D];
|
||||
public static var P1_LEFT:Array<FlxKey> = [A];
|
||||
public static var P1_DOWN:Array<FlxKey> = [S];
|
||||
public static var P1_UP:Array<FlxKey> = [W];
|
||||
@@ -34,6 +38,10 @@ class Options
|
||||
/**
|
||||
* PLAYER 2 CONTROLS (ALT)
|
||||
*/
|
||||
public static var P2_NOTE_LEFT:Array<FlxKey> = [LEFT];
|
||||
public static var P2_NOTE_DOWN:Array<FlxKey> = [DOWN];
|
||||
public static var P2_NOTE_UP:Array<FlxKey> = [UP];
|
||||
public static var P2_NOTE_RIGHT:Array<FlxKey> = [RIGHT];
|
||||
public static var P2_LEFT:Array<FlxKey> = [LEFT];
|
||||
public static var P2_DOWN:Array<FlxKey> = [DOWN];
|
||||
public static var P2_UP:Array<FlxKey> = [UP];
|
||||
@@ -46,6 +54,10 @@ class Options
|
||||
/**
|
||||
* SOLO GETTERS & SETTERS
|
||||
*/
|
||||
public static var SOLO_NOTE_LEFT(get, null):Array<FlxKey>;
|
||||
public static var SOLO_NOTE_DOWN(get, null):Array<FlxKey>;
|
||||
public static var SOLO_NOTE_UP(get, null):Array<FlxKey>;
|
||||
public static var SOLO_NOTE_RIGHT(get, null):Array<FlxKey>;
|
||||
public static var SOLO_LEFT(get, null):Array<FlxKey>;
|
||||
public static var SOLO_DOWN(get, null):Array<FlxKey>;
|
||||
public static var SOLO_UP(get, null):Array<FlxKey>;
|
||||
@@ -81,6 +93,30 @@ class Options
|
||||
for(e in P2_RIGHT) a.push(e);
|
||||
return a;
|
||||
}
|
||||
private static function get_SOLO_NOTE_LEFT() {
|
||||
var a:Array<FlxKey> = [];
|
||||
for(e in P1_NOTE_LEFT) a.push(e);
|
||||
for(e in P2_NOTE_LEFT) a.push(e);
|
||||
return a;
|
||||
}
|
||||
private static function get_SOLO_NOTE_DOWN() {
|
||||
var a:Array<FlxKey> = [];
|
||||
for(e in P1_NOTE_DOWN) a.push(e);
|
||||
for(e in P2_NOTE_DOWN) a.push(e);
|
||||
return a;
|
||||
}
|
||||
private static function get_SOLO_NOTE_UP() {
|
||||
var a:Array<FlxKey> = [];
|
||||
for(e in P1_NOTE_UP) a.push(e);
|
||||
for(e in P2_NOTE_UP) a.push(e);
|
||||
return a;
|
||||
}
|
||||
private static function get_SOLO_NOTE_RIGHT() {
|
||||
var a:Array<FlxKey> = [];
|
||||
for(e in P1_NOTE_RIGHT) a.push(e);
|
||||
for(e in P2_NOTE_RIGHT) a.push(e);
|
||||
return a;
|
||||
}
|
||||
private static function get_SOLO_ACCEPT() {
|
||||
var a:Array<FlxKey> = [];
|
||||
for(e in P1_ACCEPT) a.push(e);
|
||||
|
||||
@@ -130,6 +130,66 @@ class Controls extends FlxActionSet
|
||||
public var gamepadsAdded:Array<Int> = [];
|
||||
public var keyboardScheme = KeyboardScheme.None;
|
||||
|
||||
public var UP(get, never):Bool;
|
||||
|
||||
inline function get_UP()
|
||||
return _up.check();
|
||||
|
||||
public var LEFT(get, never):Bool;
|
||||
|
||||
inline function get_LEFT()
|
||||
return _left.check();
|
||||
|
||||
public var RIGHT(get, never):Bool;
|
||||
|
||||
inline function get_RIGHT()
|
||||
return _right.check();
|
||||
|
||||
public var DOWN(get, never):Bool;
|
||||
|
||||
inline function get_DOWN()
|
||||
return _down.check();
|
||||
|
||||
public var UP_P(get, never):Bool;
|
||||
|
||||
inline function get_UP_P()
|
||||
return _upP.check();
|
||||
|
||||
public var LEFT_P(get, never):Bool;
|
||||
|
||||
inline function get_LEFT_P()
|
||||
return _leftP.check();
|
||||
|
||||
public var RIGHT_P(get, never):Bool;
|
||||
|
||||
inline function get_RIGHT_P()
|
||||
return _rightP.check();
|
||||
|
||||
public var DOWN_P(get, never):Bool;
|
||||
|
||||
inline function get_DOWN_P()
|
||||
return _downP.check();
|
||||
|
||||
public var UP_R(get, never):Bool;
|
||||
|
||||
inline function get_UP_R()
|
||||
return _upR.check();
|
||||
|
||||
public var LEFT_R(get, never):Bool;
|
||||
|
||||
inline function get_LEFT_R()
|
||||
return _leftR.check();
|
||||
|
||||
public var RIGHT_R(get, never):Bool;
|
||||
|
||||
inline function get_RIGHT_R()
|
||||
return _rightR.check();
|
||||
|
||||
public var DOWN_R(get, never):Bool;
|
||||
|
||||
inline function get_DOWN_R()
|
||||
return _downR.check();
|
||||
|
||||
public var NOTE_UP(get, never):Bool;
|
||||
|
||||
inline function get_NOTE_UP()
|
||||
@@ -512,6 +572,10 @@ class Controls extends FlxActionSet
|
||||
inline bindKeys(Control.DOWN, Options.SOLO_DOWN);
|
||||
inline bindKeys(Control.LEFT, Options.SOLO_LEFT);
|
||||
inline bindKeys(Control.RIGHT, Options.SOLO_RIGHT);
|
||||
inline bindKeys(Control.NOTE_UP, Options.SOLO_NOTE_UP);
|
||||
inline bindKeys(Control.NOTE_DOWN, Options.SOLO_NOTE_DOWN);
|
||||
inline bindKeys(Control.NOTE_LEFT, Options.SOLO_NOTE_LEFT);
|
||||
inline bindKeys(Control.NOTE_RIGHT, Options.SOLO_NOTE_RIGHT);
|
||||
inline bindKeys(Control.ACCEPT, Options.SOLO_ACCEPT);
|
||||
inline bindKeys(Control.BACK, Options.SOLO_BACK);
|
||||
inline bindKeys(Control.PAUSE, Options.SOLO_PAUSE);
|
||||
@@ -521,6 +585,10 @@ class Controls extends FlxActionSet
|
||||
inline bindKeys(Control.DOWN, Options.P1_DOWN);
|
||||
inline bindKeys(Control.LEFT, Options.P1_LEFT);
|
||||
inline bindKeys(Control.RIGHT, Options.P1_RIGHT);
|
||||
inline bindKeys(Control.NOTE_UP, Options.P1_NOTE_UP);
|
||||
inline bindKeys(Control.NOTE_DOWN, Options.P1_NOTE_DOWN);
|
||||
inline bindKeys(Control.NOTE_LEFT, Options.P1_NOTE_LEFT);
|
||||
inline bindKeys(Control.NOTE_RIGHT, Options.P1_NOTE_RIGHT);
|
||||
inline bindKeys(Control.ACCEPT, Options.P1_ACCEPT);
|
||||
inline bindKeys(Control.BACK, Options.P1_BACK);
|
||||
inline bindKeys(Control.PAUSE, Options.P1_PAUSE);
|
||||
@@ -530,6 +598,10 @@ class Controls extends FlxActionSet
|
||||
inline bindKeys(Control.DOWN, Options.P2_DOWN);
|
||||
inline bindKeys(Control.LEFT, Options.P2_LEFT);
|
||||
inline bindKeys(Control.RIGHT, Options.P2_RIGHT);
|
||||
inline bindKeys(Control.NOTE_UP, Options.P2_NOTE_UP);
|
||||
inline bindKeys(Control.NOTE_DOWN, Options.P2_NOTE_DOWN);
|
||||
inline bindKeys(Control.NOTE_LEFT, Options.P2_NOTE_LEFT);
|
||||
inline bindKeys(Control.NOTE_RIGHT, Options.P2_NOTE_RIGHT);
|
||||
inline bindKeys(Control.ACCEPT, Options.P2_ACCEPT);
|
||||
inline bindKeys(Control.BACK, Options.P2_BACK);
|
||||
inline bindKeys(Control.PAUSE, Options.P2_PAUSE);
|
||||
|
||||
Reference in New Issue
Block a user