dev.atedeg.ecscala

Type members

Classlikes

@showAsInfix
final 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 Product with 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 CListTag[L <: CList]
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 ComponentTag[C]

A ComponentTag is a trait used to describe types keeping information about the type that would otherwise be erased at runtime.

A ComponentTag is a trait used to describe types keeping information about the type that would otherwise be erased at runtime.

Type Params
C

the type whose compiletime information are stored in the ComponentTag.

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 IteratingSystem[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.

Companion
object
Companion
class
trait ExcludingSystemBuilder[L <: CList, E <: CList] extends SystemBuilderOps[L]

A builder used to create ExcludingSystem.

A builder used to create ExcludingSystem.

Type Params
E

the type of the CList of components to be excluded.

L

the type of the CList used by the built IteratingSystem.

Companion
object
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 IteratingSystem[L <: CList](using clt: CListTag[L]) extends System

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 IteratingSystem.

Companion
object
Companion
class
trait System

This trait represents a system, which can update the World 's state.

This trait represents a system, which can update the World 's state.

Companion
object
object System
Companion
class
trait SystemBuilder[L <: CList] extends SystemBuilderOps[L]

A builder used to create IteratingSystem.

A builder used to create IteratingSystem.

Type Params
L

the type of the CList used by the built IteratingSystem.

Companion
object
Companion
class
trait SystemBuilderOps[L <: CList]

The generic operations that a SystemBuilder provides.

The generic operations that a SystemBuilder provides.

Type Params
L

the type of the CList used by the built IteratingSystem.

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 = Double

Givens

Givens

Extensions

Extensions

extension (list: L)
def taggedWith[L <: CList](clt: CListTag[L])(implicit evidence$1: CListTag[L]): Iterable[(Component, ComponentTag[Component])]
extension (list: Deletable[L])
@targetName("deletableTaggedWith")
def taggedWith[L <: CList](clt: CListTag[L])(implicit evidence$2: CListTag[L]): Iterable[(Component, ComponentTag[Component])]