mischief-ecs
Safe HaskellNone
LanguageGHC2024

Mischief.ECS.Prelude

Synopsis

Documentation

data Entity Source #

UNLIFTED

Points to an unique entity. The first Word# is an id, the second is a generation.

It is guaranteed that there can't be two alive entities with the same id.

Instances

Instances details
Show Entity Source # 
Instance details

Defined in Mischief.ECS.EntityDef

Eq Entity Source # 
Instance details

Defined in Mischief.ECS.EntityDef

Methods

(==) :: Entity -> Entity -> Bool #

(/=) :: Entity -> Entity -> Bool #

Ord Entity Source # 
Instance details

Defined in Mischief.ECS.EntityDef

Queryable E Entity Source # 
Instance details

Defined in Mischief.ECS.World.Query.Queryable

Component c => IntoQueryFilter (CheckR Entity c) Source # 
Instance details

Defined in Mischief.ECS.World.Query.QueryFilter

Component c => EraseIntoStorage (R c Entity, c -> Bool) CheckFilterType Source # 
Instance details

Defined in Mischief.ECS.World.Query.QueryFilter

Methods

erase :: (R c Entity, c -> Bool) -> CheckFilterType Source #

Component c => EraseIntoStorage (R c Entity) FilterType Source # 
Instance details

Defined in Mischief.ECS.World.Query.QueryFilter

Methods

erase :: R c Entity -> FilterType Source #

Component c => Queryable (HasR c Entity) Bool Source # 
Instance details

Defined in Mischief.ECS.World.Query.Queryable

Component c => Queryable (MR c Entity) (Maybe (Result (Rel c))) Source # 
Instance details

Defined in Mischief.ECS.World.Query.Queryable

Component c => Queryable (R c Entity) (Result (Rel c)) Source # 
Instance details

Defined in Mischief.ECS.World.Query.Queryable

class (Typeable c, IsExclusive (RelExclusivity c)) => Component c Source #

The Component typeclass.

Instances

Instances details
Component ScheduleLabel Source # 
Instance details

Defined in Mischief.ECS.App.Schedules

Associated Types

type RelExclusivity ScheduleLabel 
Instance details

Defined in Mischief.ECS.App.Schedules

Component Schedules Source # 
Instance details

Defined in Mischief.ECS.App.Schedules

Associated Types

type RelExclusivity Schedules 
Instance details

Defined in Mischief.ECS.App.Schedules

Component StartupSchedule Source # 
Instance details

Defined in Mischief.ECS.App.Schedules

Associated Types

type RelExclusivity StartupSchedule 
Instance details

Defined in Mischief.ECS.App.Schedules

Component UpdateSchedule Source # 
Instance details

Defined in Mischief.ECS.App.Schedules

Associated Types

type RelExclusivity UpdateSchedule 
Instance details

Defined in Mischief.ECS.App.Schedules

Component LastSystemTick Source # 
Instance details

Defined in Mischief.ECS.App.SystemDef

Associated Types

type RelExclusivity LastSystemTick 
Instance details

Defined in Mischief.ECS.App.SystemDef

Component SystemTick Source # 
Instance details

Defined in Mischief.ECS.App.SystemDef

Associated Types

type RelExclusivity SystemTick 
Instance details

Defined in Mischief.ECS.App.SystemDef

Component ScheduledIn Source # 
Instance details

Defined in Mischief.ECS.App.Systems

Associated Types

type RelExclusivity ScheduledIn 
Instance details

Defined in Mischief.ECS.App.Systems

Component SystemFunction Source # 
Instance details

Defined in Mischief.ECS.App.Systems

Associated Types

type RelExclusivity SystemFunction 
Instance details

Defined in Mischief.ECS.App.Systems

Component Systems Source # 
Instance details

Defined in Mischief.ECS.App.Systems

Associated Types

type RelExclusivity Systems 
Instance details

Defined in Mischief.ECS.App.Systems

Component ComponentArchetypes Source # 
Instance details

Defined in Mischief.ECS.Components

Component ComponentPairs Source # 
Instance details

Defined in Mischief.ECS.Components

Associated Types

type RelExclusivity ComponentPairs 
Instance details

Defined in Mischief.ECS.Components

Component ComponentType Source # 
Instance details

Defined in Mischief.ECS.Components

Associated Types

type RelExclusivity ComponentType 
Instance details

Defined in Mischief.ECS.Components

Component DefaultValue Source # 
Instance details

Defined in Mischief.ECS.Components

Associated Types

type RelExclusivity DefaultValue 
Instance details

Defined in Mischief.ECS.Components

Component RequiredBy Source # 
Instance details

Defined in Mischief.ECS.Components

Associated Types

type RelExclusivity RequiredBy 
Instance details

Defined in Mischief.ECS.Components

Component Requires Source # 
Instance details

Defined in Mischief.ECS.Components

Associated Types

type RelExclusivity Requires 
Instance details

Defined in Mischief.ECS.Components

Component Name Source # 
Instance details

Defined in Mischief.ECS.Components.Common

Associated Types

type RelExclusivity Name 
Instance details

Defined in Mischief.ECS.Components.Common

Component ObserverOrder Source # 
Instance details

Defined in Mischief.ECS.Observer

Associated Types

type RelExclusivity ObserverOrder 
Instance details

Defined in Mischief.ECS.Observer

Component IsExclusiveRelationship Source # 
Instance details

Defined in Mischief.ECS.Relationships

Component ChildOf Source # 
Instance details

Defined in Mischief.ECS.Relationships.ChildOf

Associated Types

type RelExclusivity ChildOf 
Instance details

Defined in Mischief.ECS.Relationships.ChildOf

Component Before Source # 
Instance details

Defined in Mischief.ECS.Relationships.Order

Associated Types

type RelExclusivity Before 
Instance details

Defined in Mischief.ECS.Relationships.Order

Component Visited Source # 
Instance details

Defined in Mischief.ECS.Relationships.Order

Associated Types

type RelExclusivity Visited 
Instance details

Defined in Mischief.ECS.Relationships.Order

Component Time Source # 
Instance details

Defined in Mischief.ECS.Time

Associated Types

type RelExclusivity Time 
Instance details

Defined in Mischief.ECS.Time

Typeable e => Component (Observer e) Source # 
Instance details

Defined in Mischief.ECS.Observer

Associated Types

type RelExclusivity (Observer e) 
Instance details

Defined in Mischief.ECS.Observer

(Typeable e, Typeable k) => Component (EventProxy e) Source # 
Instance details

Defined in Mischief.ECS.Observer

Associated Types

type RelExclusivity (EventProxy e) 
Instance details

Defined in Mischief.ECS.Observer

(Typeable a, Typeable b, Typeable k1, Typeable k2) => Component (TestG a b) Source # 
Instance details

Defined in Mischief.ECS.World.Query.TH.QD

Associated Types

type RelExclusivity (TestG a b) 
Instance details

Defined in Mischief.ECS.World.Query.TH.QD

required :: Component c => Set DefaultComponentType Source #

List of components required by this one. All required components must be Default

Example

data A = A
instance Component A where
  required = require @(B, C)

data B = B Int deriving (Component, Generic, Default)

data C = C String deriving (Component)
instance Default C where
  def = C "Default String"

query :: forall qd output m w. (Queryable qd output, MonadSystem w m) => qd -> m [output] Source #

remove :: Collectable c ToRemove => c -> Entity -> System () Source #