Available since

4.6.0

.

Constructor

@:value({ InvertX : false, InvertY : false, DeadZone : 0.1, PixelsPerUnit : 10, Axis : EITHER })new(Trigger:FlxAnalogState, Axis:FlxAnalogAxis = EITHER, PixelsPerUnit:Int = 10, DeadZone:Float = 0.1, InvertY:Bool = false, InvertX:Bool = false)

Mouse input -- X/Y is the RELATIVE motion of the mouse since the last frame

Parameters:

Trigger

What state triggers this action (MOVED, JUST_MOVED, STOPPED, JUST_STOPPED)

Axis

which axes to monitor for triggering: X, Y, EITHER, or BOTH

PixelsPerUnit

How many pixels of movement = 1.0 in analog motion (lower: more sensitive, higher: less sensitive)

DeadZone

Minimum analog value before motion will be reported

InvertY

Invert the Y axis

InvertX

Invert the X axis

Methods

Inherited Variables

Defined by FlxActionInputAnalog

@:value(0)read onlyx:Float = 0

read onlyxMoved:FlxInput<Int>

@:value(0)read onlyy:Float = 0

read onlyyMoved:FlxInput<Int>

Defined by FlxActionInput

@:value(false)read onlydestroyed:Bool = false

device:FlxInputDevice

Mouse, Keyboard, Gamepad, SteamController, etc.

deviceID:Int

Gamepad ID or Steam Controller handle (ignored for Mouse & Keyboard)

read onlyinputID:Int

Input code (FlxMouseButtonID, FlxKey, FlxGamepadInputID, or Steam Controller action handle)

read onlytrigger:FlxInputState

What state triggers this action (PRESSED, JUST_PRESSED, RELEASED, JUST_RELEASED)

type:FlxInputType

Digital or Analog

Inherited Methods