World

sealed trait World

A container for Entity, Components and System.

Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def addSystem(system: System): Unit

Add a System to the World.

Add a System to the World.

Value Params
system

the system to add.

def clearEntities(): Unit

Remove all the entites and their respective components from the World

Remove all the entites and their respective components from the World

Create a new Entity and add it to the World.

Create a new Entity and add it to the World.

Returns

the created Entity.

def entitiesCount: Int
Returns

the number of Entity in the World.

def getView[L <: CList](implicit evidence$1: CListTag[L]): View[L]

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

A View on this 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.

Returns

the View.

def getView[LIncluded <: CList, LExcluded <: CList](implicit evidence$2: CListTag[LIncluded], evidence$3: CListTag[LExcluded]): ExcludingView[LIncluded, 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.

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.

Returns

the View.

def removeEntity(entity: Entity): Unit

Remove a given Entity from the World.

Remove a given Entity from the World.

Value Params
entity

the Entity to remove.

def removeSystem(system: System): Unit

Remove a System from the World.

Remove a System from the World.

Value Params
system

the system to remove.

def update(deltaTime: DeltaTime): Unit

Update the world.

Update the world.

Value Params
deltaTime

the time between two updates.