|
|
@ -1,5 +1,6 @@
|
|
|
|
import 'package:flame/components.dart';
|
|
|
|
import 'package:flame/components.dart';
|
|
|
|
import 'package:flame_bloc/flame_bloc.dart';
|
|
|
|
import 'package:flame_bloc/flame_bloc.dart';
|
|
|
|
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
|
|
|
|
|
|
|
/// {@template component_controller}
|
|
|
|
/// {@template component_controller}
|
|
|
|
/// A [ComponentController] is a [Component] in charge of handling the logic
|
|
|
|
/// A [ComponentController] is a [Component] in charge of handling the logic
|
|
|
@ -30,6 +31,7 @@ mixin Controls<T extends ComponentController> on Component {
|
|
|
|
late final T controller;
|
|
|
|
late final T controller;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
|
|
|
|
@mustCallSuper
|
|
|
|
Future<void> onLoad() async {
|
|
|
|
Future<void> onLoad() async {
|
|
|
|
await super.onLoad();
|
|
|
|
await super.onLoad();
|
|
|
|
await add(controller);
|
|
|
|
await add(controller);
|
|
|
|