addTrait
Call Signature
Section titled “Call Signature”addTrait<
S>(writer,target,trait,value?):void
Adds trait to target, with value over its defaults where given:
an entity’s, or the world’s. The writer is as setTrait’s. A target
that holds the trait already is refused, since koota would keep the
old value and drop the new: setTrait changes it. As Unity’s
EntityManager.AddComponent.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
S extends Schema |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
EntityAuthority | PredictedStep |
target |
PredictedEntity |
trait |
PredictedTrait<S> |
value? |
TraitValue<S> |
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”addTrait<
T>(writer,target,trait,value?):void
Adds trait to target, with value over its defaults where given:
an entity’s, or the world’s. The writer is as setTrait’s. A target
that holds the trait already is refused, since koota would keep the
old value and drop the new: setTrait changes it. As Unity’s
EntityManager.AddComponent.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends UnstreamedTrait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
EntityAuthority | SystemStep |
target |
Target |
trait |
T |
value? |
TraitValue<ExtractSchema<T>> |
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”addTrait<
T>(writer,target,trait,value?):void
Adds trait to target, with value over its defaults where given:
an entity’s, or the world’s. The writer is as setTrait’s. A target
that holds the trait already is refused, since koota would keep the
old value and drop the new: setTrait changes it. As Unity’s
EntityManager.AddComponent.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends AnyEntityPredictedTrait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
PredictedStep |
target |
PredictedEntity |
trait |
T |
value? |
TraitValue<ExtractSchema<T>> |
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”addTrait<
T>(writer,target,trait,value?):void
Adds trait to target, with value over its defaults where given:
an entity’s, or the world’s. The writer is as setTrait’s. A target
that holds the trait already is refused, since koota would keep the
old value and drop the new: setTrait changes it. As Unity’s
EntityManager.AddComponent.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends Trait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
EntityAuthority |
target |
Entity |
trait |
T |
value? |
TraitValue<ExtractSchema<T>> |
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”addTrait<
T>(writer,target,trait,value?):void
Adds trait to target, with value over its defaults where given:
an entity’s, or the world’s. The writer is as setTrait’s. A target
that holds the trait already is refused, since koota would keep the
old value and drop the new: setTrait changes it. As Unity’s
EntityManager.AddComponent.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends Trait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
Authority |
target |
World |
trait |
T |
value? |
TraitValue<ExtractSchema<T>> |
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”addTrait<
T>(writer,target,trait,value?):void
Adds trait to target, with value over its defaults where given:
an entity’s, or the world’s. The writer is as setTrait’s. A target
that holds the trait already is refused, since koota would keep the
old value and drop the new: setTrait changes it. As Unity’s
EntityManager.AddComponent.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends Trait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
SetupWriter |
target |
Target |
trait |
T |
value? |
TraitValue<ExtractSchema<T>> |
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”addTrait<
T>(writer,target,trait,value?):void
Adds trait to target, with value over its defaults where given:
an entity’s, or the world’s. The writer is as setTrait’s. A target
that holds the trait already is refused, since koota would keep the
old value and drop the new: setTrait changes it. As Unity’s
EntityManager.AddComponent.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends LocalTrait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
ViewWriter | EntityAuthority | SystemStep |
target |
Target |
trait |
T |
value? |
TraitValue<ExtractSchema<T>> |
Returns
Section titled “Returns”void