Joystick class

Mixed-in types
  • EventDispatcher

Constructors

Joystick.new({EdgeInsets margin = const EdgeInsets.only(left: 10, bottom: 10), double size = 80, required Size screenSize, required GlobalKey<PeripheralsState> listenableKey, int color = 0xFF607D8B})

Properties

angle double
no setter
camera ↔ OrthographicCamera
getter/setter pair
color int
final
direction JoystickMoveDirectional
getter/setter pair
dragPosition ↔ Vector2
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
intensity double
no setter
isMoving bool
no setter
listenableKey GlobalKey<PeripheralsState>
getter/setter pair
margin EdgeInsets
final
origin ↔ Vector3
getter/setter pair
radians double
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scene ↔ Scene
getter/setter pair
screenSize Size
getter/setter pair
size double
final

Methods

activate() → void
Adds the event listeners of the controls.
addEventListener(String type, Function listener) → void
type - The type of event to listen to.
inherited
clearListeners() → void
Remove all Listeners.
inherited
deactivate() → void
Removes the event listeners of the controls.
dispatchEvent(Event event) → void
event - The event that gets fired.
inherited
dispose() → void
override
hasEventListener(String type, Function listener) bool
type - The type of event to listen to.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onPointerCancel(dynamic event) → void
onPointerDown(dynamic event) → void
onPointerMove(dynamic event) → void
removeEventListener(String type, Function listener) → void
type - The type of the listener that gets removed.
inherited
toString() String
A string representation of this object.
inherited
update() → void
updatePointer(dynamic event) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited