ComponentSpawner constructor
ComponentSpawner({
- required Vector2 position,
- required ShapeHitbox area,
- required int interval,
- required SpawnerPositionBuilder builder,
- bool spawnCondition(
- BonfireGameInterface game
- bool onlyVisible = true,
Implementation
ComponentSpawner({
required Vector2 position,
required this.area,
required this.interval,
required this.builder,
this.spawnCondition,
this.onlyVisible = true,
}) {
_random = Random();
this.position = position;
size = area.size;
}