def child_step
bendvy-ecs-core@0.1.0.4 · relation_cleanup.bend:43
import bendvy-ecs-core@0.1.0.4/relation_cleanup.bend as RelationCleanup
import Base
import entity_key.bend as Key
import relation_types.bend as G
import relation_commands.bend as A
import world.bend as W
43def child_step(~S: Data,~C: Type,~R: Type,~E: Data,kind: G.RelationKind,world: W.World<S,A.Store<S,C>,R,A.Notice<S,E>>,namespace: U32,id:Key.Key,+descriptor: G.Descriptor<S>,remaining: List<&2,G.Descriptor<S>>,child:Key.Key,children: List<&2,Key.Key>,frames: List<&2,G.CleanupFrame<S>>) -> W.World<S,A.Store<S,C>,R,A.Notice<S,E>> & List<&2,G.CleanupFrame<S>>:
44 match kind:
45 case G.Hierarchy{}: (world,G.CleanupEnter{child} <> G.CleanupChildren{id,descriptor,remaining,children} <> frames)
46 case G.Ordinary{}: (A.apply_unrelate(~S,~C,~R,~E,world,descriptor,W.Handle{namespace,child}),G.CleanupChildren{id,descriptor,remaining,children} <> frames)