Skip to content

Commit

Permalink
cast trigger in super
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Oct 28, 2024
1 parent f05bff4 commit 7f7c8b0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions flixel/input/actions/FlxActionInputAnalog.hx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class FlxActionInputAnalogMouseMotion extends FlxActionInputAnalog
deadZone = DeadZone;
invertX = InvertX;
invertY = InvertY;
super(FlxInputDevice.MOUSE, -1, cast Trigger, Axis);
super(FlxInputDevice.MOUSE, -1, Trigger, Axis);
}

override public function update():Void
Expand Down Expand Up @@ -144,7 +144,7 @@ class FlxActionInputAnalogMousePosition extends FlxActionInputAnalog
*/
public function new(Trigger:FlxAnalogState, Axis:FlxAnalogAxis = EITHER)
{
super(FlxInputDevice.MOUSE, -1, cast Trigger, Axis);
super(FlxInputDevice.MOUSE, -1, Trigger, Axis);
}

override public function update():Void
Expand Down Expand Up @@ -193,7 +193,7 @@ class FlxActionInputAnalogGamepad extends FlxActionInputAnalog
*/
public function new(InputID:FlxGamepadInputID, Trigger:FlxAnalogState, Axis:FlxAnalogAxis = EITHER, GamepadID:Int = FlxInputDeviceID.FIRST_ACTIVE)
{
super(FlxInputDevice.GAMEPAD, InputID, cast Trigger, Axis, GamepadID);
super(FlxInputDevice.GAMEPAD, InputID, Trigger, Axis, GamepadID);
}

override public function update():Void
Expand Down Expand Up @@ -265,7 +265,7 @@ class FlxActionInputAnalogSteam extends FlxActionInputAnalog
@:allow(flixel.input.actions.FlxActionSet)
function new(ActionHandle:Int, Trigger:FlxAnalogState, Axis:FlxAnalogAxis = EITHER, DeviceID:Int = FlxInputDeviceID.ALL)
{
super(FlxInputDevice.STEAM_CONTROLLER, ActionHandle, cast Trigger, Axis, DeviceID);
super(FlxInputDevice.STEAM_CONTROLLER, ActionHandle, Trigger, Axis, DeviceID);
#if FLX_NO_STEAM
FlxG.log.warn("steamwrap library not installed; steam inputs will be ignored.");
#end
Expand Down Expand Up @@ -310,9 +310,9 @@ class FlxActionInputAnalog extends FlxActionInput
static inline var A_X = true;
static inline var A_Y = false;

function new(Device:FlxInputDevice, InputID:Int, Trigger:FlxInputState, Axis:FlxAnalogAxis = EITHER, DeviceID:Int = FlxInputDeviceID.FIRST_ACTIVE)
function new(Device:FlxInputDevice, InputID:Int, Trigger:FlxAnalogState, Axis:FlxAnalogAxis = EITHER, DeviceID:Int = FlxInputDeviceID.FIRST_ACTIVE)
{
super(FlxInputType.ANALOG, Device, InputID, Trigger, DeviceID);
super(FlxInputType.ANALOG, Device, InputID, cast Trigger, DeviceID);
axis = Axis;
xMoved = new FlxInput<Int>(0);
yMoved = new FlxInput<Int>(1);
Expand Down

0 comments on commit 7f7c8b0

Please sign in to comment.