mischief-ecs
Safe HaskellNone
LanguageGHC2024

Mischief.ECS.Hooks

Synopsis

Documentation

relComplementary :: (Component a, Component b) => (a -> b) -> Hooks a Source #

When applied on a component A, this hook takes a function (A -> B) and does two things:

  1. When Rel (A, y) is inserted on entity x, Rel (B, x) will be inserted on y (the value of B obtained through the provided function).
  2. When Rel (a, y) is removed from an entity x, Rel (B, x) will be removed from y.

relCleanup :: Component a => (CleanupRequest -> System ()) -> Hooks a Source #

Orphan instances

EraseIntoStorage (Hooks c) (Hooks c) Source # 
Instance details

Methods

erase :: Hooks c -> Hooks c Source #

Event (e c) => EraseIntoStorage (e c -> System ()) (Hooks c) Source # 
Instance details

Methods

erase :: (e c -> System ()) -> Hooks c Source #