mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 19:12:31 +08:00
feat: SpawnComponent (#2709)
This PR introduces the `SpawnComponent`, which randomly spawns components within a set area.
This commit is contained in:
@ -10,6 +10,7 @@ import 'package:examples/stories/components/keys_example.dart';
|
||||
import 'package:examples/stories/components/look_at_example.dart';
|
||||
import 'package:examples/stories/components/look_at_smooth_example.dart';
|
||||
import 'package:examples/stories/components/priority_example.dart';
|
||||
import 'package:examples/stories/components/spawn_component_example.dart';
|
||||
import 'package:examples/stories/components/time_scale_example.dart';
|
||||
import 'package:flame/game.dart';
|
||||
|
||||
@ -64,6 +65,14 @@ void addComponentsStories(Dashbook dashbook) {
|
||||
baseLink('components/components_notifier_provider_example.dart'),
|
||||
info: ComponentsNotifierProviderExampleWidget.description,
|
||||
)
|
||||
..add(
|
||||
'Spawn Component',
|
||||
(_) => const GameWidget.controlled(
|
||||
gameFactory: SpawnComponentExample.new,
|
||||
),
|
||||
codeLink: baseLink('components/spawn_component_example.dart'),
|
||||
info: SpawnComponentExample.description,
|
||||
)
|
||||
..add(
|
||||
'Time Scale',
|
||||
(_) => const GameWidget.controlled(
|
||||
|
||||
Reference in New Issue
Block a user