diff --git a/doc/input.md b/doc/input.md index a87042fb0..d3cc55951 100644 --- a/doc/input.md +++ b/doc/input.md @@ -179,7 +179,7 @@ import 'package:flutter/material.dart'; class MyGame extends BaseGame with MultiTouchDragDetector { final player = Player(); final joystick = JoystickComponent( - joystickPriority: 0, + componentPriority: 0, directional: JoystickDirectional( spriteBackgroundDirectional: Sprite('directional_background.png'), // optional spriteKnobDirectional: Sprite('directional_knob.png'), // optional diff --git a/lib/components/joystick/joystick_component.dart b/lib/components/joystick/joystick_component.dart index 8f3691c71..f58a34667 100644 --- a/lib/components/joystick/joystick_component.dart +++ b/lib/components/joystick/joystick_component.dart @@ -37,12 +37,12 @@ abstract class JoystickController extends Component with HasGameRef { class JoystickComponent extends JoystickController { final List actions; final JoystickDirectional directional; - final int joystickPriority; + final int componentPriority; JoystickComponent({ this.actions, this.directional, - this.joystickPriority = 0, + this.componentPriority = 0, }); void addAction(JoystickAction action) { @@ -83,6 +83,6 @@ class JoystickComponent extends JoystickController { @override int priority() { - return joystickPriority; + return componentPriority; } }