spawn method

  1. @override
void spawn(
  1. EntitySpawn spawn
)
override

Brings the spawn's entity into the world.

Does nothing by default, which is right for the kinds that are pure data — a spawn point is a coordinate somebody reads, and a torch is a light the level already carries.

Implementation

@override
void spawn(EntitySpawn spawn) {
  final entity = spawn.entity;
  final context = spawn.context;
  final kind = collider;
  if (kind != null) place(entity, context, kind: kind);
}