ExtensionMethodsDSL
trait ExtensionMethodsDSL
Extensions
Extensions
extension (component: A)
def and[A <: Component](rightComponent: B)(using entity: Entity)(implicit evidence$4: ComponentTag[A], ct: ComponentTag[B]): ComponentWrapper
This method adds the current component and its agrument to an entity and enables the following syntax:
This method adds the current component and its agrument to an entity and enables the following syntax:
entity withComponents {
Component1() and Component2()
}
- Value Params
- rightComponent
The component to be added to an entity.
- Returns
A ComponentWrapper that enables the components chaining.
extension (entity: Entity)
This method enables the following syntax:
This method enables the following syntax:
entity + Component()
This method enables the following syntax:
This method enables the following syntax:
entity - Component()
This method enables the following syntax:
This method enables the following syntax:
entity withComponent Component()
extension (world: World)