Skip to content

Static Functions

ControlsObject.determinePressedControls(previousControls:Int, currentControls:Int):Int

description

Figures out which buttons were pressed VS held provided the previous and current control bits Parameters:

  • Bits for the previous buttons
  • Bits for the current buttons

Instance Variables

ACTION

Type

Bool

ATTACK

Type

Bool

CROUCH

Type

Bool

DASH

Type

Bool

DOWN

Type

Bool

DROP_THROUGH

Type

Bool

EMOTE

Type

Bool

FULL_HOP

Type

Bool

GRAB

Type

Bool

JUMP

Type

Bool

JUMP_ANY

Type

Bool

LEFT

Type

Bool

PAUSE

Type

Bool

Type

Bool

RIGHT_STICK_DOWN

Type

Bool

RIGHT_STICK_LEFT

Type

Bool

RIGHT_STICK_RIGHT

Type

Bool

RIGHT_STICK_UP

Type

Bool

SHIELD

Type

Bool

SHIELD1

Type

Bool

SHIELD2

Type

Bool

SHIELD_AIR

Type

Bool

SHORT_HOP

Type

Bool

SPECIAL

Type

Bool

STRONG

Type

Bool

TAP_JUMP

Type

Bool

TILT

Type

Bool

UP

Type

Bool

buttons

Type

Int

description

Current state of button inputs represented by a 32-bit integer

flags

Type

Int

description

Current state of input flags represented by a 32-bit integer

leftStickAngle

Type

Float

description

Angle of the left stick calculated using leftStickX and leftStickY

leftStickAxes

Type

Int

leftStickX

Type

Float

leftStickY

Type

Float

rightStickAngle

Type

Float

description

Angle of the right stick calculated using leftStickX and leftStickY

rightStickAxes

Type

Int

rightStickX

Type

Float

rightStickY

Type

Float

Instance Functions

analogDashActive():Bool

analogWalkActive():Bool

clone():ControlsObject

copyFrom(controlsObject:ControlsObject):Void

description

Copies the controls values from another ControlsObject instance Parameters:

  • The ControlsObject instance to copy controls data from

digitalDashActive():Bool

digitalWalkActive():Bool

getAngle(rightStick?:Bool):Float

description

Returns the angle of the left stick or right sticks, rounded to the nearest 45 degree angle Parameters:

  • Pass as true to use the right stick for the angle calculation. Otherwise the left stick is used.

hasRightStickAttackFlag():Bool

hasRightStickSpecialFlag():Bool

reset():Void

rightStickPressed():Bool

syncStickAngles():Void

syncStickButtons():Void

description

Ensure the directional buttons correspond with any stick angle

toString():String

description

Returns a user readable string of current inputs