mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-03 04:18:25 +08:00
Some fixes regarding the joystic PR
This commit is contained in:
44
doc/examples/joystick/.gitignore
vendored
Normal file
44
doc/examples/joystick/.gitignore
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Web related
|
||||
lib/generated_plugin_registrant.dart
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Exceptions to above rules.
|
||||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
||||
@ -12,7 +12,7 @@ class Player extends Component implements JoystickListener {
|
||||
final _greenPaint = Paint()..color = const Color(0xFF00FF00);
|
||||
final double speed = 159;
|
||||
double currentSpeed = 0;
|
||||
double radAngle;
|
||||
double radAngle = 0;
|
||||
bool _move = false;
|
||||
Paint _paint;
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ class JoystickDirectional {
|
||||
Offset(margin.left, _screenSize.height - margin.bottom);
|
||||
_backgroundRect = Rect.fromCircle(center: osBackground, radius: size / 2);
|
||||
|
||||
Offset osKnob =
|
||||
final Offset osKnob =
|
||||
Offset(_backgroundRect.center.dx, _backgroundRect.center.dy);
|
||||
_knobRect = Rect.fromCircle(center: osKnob, radius: size / 4);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user