JoystickAction class

Constructors

JoystickAction({required dynamic actionId, Future<Sprite>? sprite, Future<Sprite>? spritePressed, Future<Sprite>? spriteBackgroundDirection, bool enableDirection = false, double size = 50, double sizeFactorBackgroundDirection = 1.5, EdgeInsets margin = const EdgeInsets.all(50), Color color = Colors.blueGrey, Alignment alignment = Alignment.bottomRight, double opacityBackground = 0.5, double opacityKnob = 0.8})

Properties

actionId → dynamic
final
alignment Alignment
final
color Color
final
enableDirection bool
final
hashCode int
The hash code for this object.
no setterinherited
isPressed bool
getter/setter pair
margin EdgeInsets
final
opacityBackground double
final
opacityKnob double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size double
final
sizeFactorBackgroundDirection double
final
sprite Sprite?
getter/setter pair
spriteBackgroundDirection Sprite?
getter/setter pair
spritePressed Sprite?
getter/setter pair

Methods

actionDown(int pointer, Offset localPosition) → void
actionMove(int pointer, Offset localPosition) → void
actionUp(int pointer) → void
getViewportPosition(Offset position) Offset
initialize(PlayerControllerListener controller, Viewport viewport) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onLoad() Future<void>
pressed() → void
render(Canvas c) → void
toString() String
A string representation of this object.
inherited
unPressed() → void
update(double dt) → void

Operators

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