feat: Add Transform2D.setFrom and Transform2D.clone (#1495)

This commit is contained in:
Lukas Klingsbo
2022-03-27 23:48:26 +02:00
committed by GitHub
parent a559d9a12b
commit 295468f03c
3 changed files with 38 additions and 8 deletions

View File

@ -11,7 +11,7 @@ import 'package:flutter/material.dart';
import 'joystick_player.dart';
class JoystickAdvancedExample extends FlameGame
with HasDraggables, HasTappables {
with HasDraggables, HasTappables, HasCollisionDetection {
static const String description = '''
In this example we showcase how to use the joystick by creating
`SpriteComponent`s that serve as the joystick's knob and background.
@ -35,6 +35,7 @@ class JoystickAdvancedExample extends FlameGame
columns: 6,
rows: 1,
);
add(ScreenHitbox());
joystick = JoystickComponent(
knob: SpriteComponent(
sprite: sheet.getSpriteById(1),