ProviderTagDelegate

class ProviderTagDelegate<T : Component>(mapper: ComponentMapper<T>, componentClass: Class<T>, defaultValueProvider: () -> T) : TagDelegate<T>

Property delegate for an Entity wrapping around a ComponentMapper. Allows checking the presence of a Component of an Entity. Automatically creates instances of the T if its value is set to true.

Constructors

Link copied to clipboard
constructor(mapper: ComponentMapper<T>, componentClass: Class<T>, defaultValueProvider: () -> T)

Functions

Link copied to clipboard
open operator override fun getValue(thisRef: Entity, property: KProperty<*>): Boolean
Link copied to clipboard
open operator override fun setValue(thisRef: Entity, property: KProperty<*>, value: Boolean)