dev.atedeg.ecscala

Type members

Classlikes

@showAsInfix
case class &:[+C <: Component, +L <: CList](h: C, t: L)(implicit evidence$1: ComponentTag[C]) extends CList

Constructor of a CList consisting of a head and another CList as tail.

Constructor of a CList consisting of a head and another CList as tail.

Type Params
H

the type of the head of the CList.

T

the type of the tail of the CList.

Value Params
h

the head of the CList.

t

the tail of the CList.

sealed trait CList extends Iterable[Component]

A List of elements whose type must be a subtype of Component.

A List of elements whose type must be a subtype of Component.

Companion
object
object CList
Companion
class
sealed trait CNil extends CList

An empty CList.

An empty CList.

Companion
object
case object CNil extends CNil
Companion
class
trait Component

This trait represents an Entity 's feature.

This trait represents an Entity 's feature.

Companion
object
object Component
Companion
class
sealed trait Deleted extends Component

A special Component type that is used to represent a component removal inside a System

A special Component type that is used to represent a component removal inside a System

Companion
object
case object Deleted extends Deleted
Companion
class
sealed trait Entity

This trait represents an entity of ECS whose state is defined by its components.

This trait represents an entity of ECS whose state is defined by its components.

Companion
object
object Entity

Factory for dev.atedeg.ecscala.Entity instances.

Factory for dev.atedeg.ecscala.Entity instances.

Companion
class
trait ExcludingSystem[LIncluded <: CList, LExcluded <: CList](using cltIncl: CListTag[LIncluded], cltExcl: CListTag[LExcluded]) extends System[LIncluded]

Represent a way to iterate over entities with specific components (given by the type parameter LIncluded) and without specific components (given by the type parameter LExcluded) and manipulate them.

Represent a way to iterate over entities with specific components (given by the type parameter LIncluded) and without specific components (given by the type parameter LExcluded) and manipulate them.

Type Params
LExcluded

a CList representing the Components to filter out from the selected entities.

LIncluded

a CList representing the Components available to the System.

trait ExcludingView[LIncluded <: CList, LExcluded <: CList] extends View[LIncluded]

A View on this World that allows to iterate over its entities with components of the type specified in LIncluded, that do not have any of the components listed in LExcluded.

A View on this World that allows to iterate over its entities with components of the type specified in LIncluded, that do not have any of the components listed in LExcluded.

Type Params
LExcluded

CList with the types of the components that must not be present in any entity.

LIncluded

CList with the types of the components that must be present in all entities.

trait System[L <: CList](using clt: CListTag[L])

Represent a way to iterate over entities with specific components (given by the type parameter L) and manupulate them.

Represent a way to iterate over entities with specific components (given by the type parameter L) and manupulate them.

Type Params
L

a CList representing the Components available to the System.

trait View[L <: CList] extends Iterable[(Entity, L)]

A View on a World that allows to iterate over its entities with components of the type specified in L.

A View on a World that allows to iterate over its entities with components of the type specified in L.

Type Params
L

CList with the types of the components.

sealed trait World

A container for Entity, Components and System.

A container for Entity, Components and System.

Companion
object
object World

A factory for the World.

A factory for the World.

Companion
class

Types

type Deletable[L <: CList] = L match { case h &: t => h | Deleted &: Deletable[t] case CNil => CNil }

Represents a CList whose elements can either be a standard Component or a special Deleted component, representing a component that was deleted.

Represents a CList whose elements can either be a standard Component or a special Deleted component, representing a component that was deleted.

Type Params
L

the type of the CList to be wrapped.

type DeltaTime = Float