script¶
script provides access to the component and entity.Properties¶
DamageableComponent DamageableComponent¶
The
DamageableComponent component. Returns nil if it does not exist on the entity.YaBackpackComponent YaBackpackComponent¶
The
YaBackpackComponent component. Returns nil if it does not exist on the entity.YaBackpackConfigComponent YaBackpackConfigComponent¶
The
YaBackpackConfigComponent component. Returns nil if it does not exist on the entity.YaForcerComponent YaForcerComponent¶
The
YaForcerComponent component. Returns nil if it does not exist on the entity.YaGroupConfigComponent YaGroupConfigComponent¶
The
YaGroupConfigComponent component. Returns nil if it does not exist on the entity.YaItemConfigComponent YaItemConfigComponent¶
The
YaItemConfigComponent component. Returns nil if it does not exist on the entity.YaMovableComponent YaMovableComponent¶
The
YaMovableComponent component. Returns nil if it does not exist on the entity.YaMoverComponent YaMoverComponent¶
The
YaMoverComponent component. Returns nil if it does not exist on the entity.YaPendulumComponent YaPendulumComponent¶
The
YaPendulumComponent component. Returns nil if it does not exist on the entity.YaPlayerComponent YaPlayerComponent¶
The
YaPlayerComponent component. Returns nil if it does not exist on the entity.YaSpinnerComponent YaSpinnerComponent¶
The
YaSpinnerComponent component. Returns nil if it does not exist on the entity.YaTraceMoverComponent YaTraceMoverComponent¶
The
YaTraceMoverComponent component. Returns nil if it does not exist on the entity.YaVfxComponent YaVfxComponent¶
The
YaVfxComponent component. Returns nil if it does not exist on the entity.Functions¶
table GetYaComponent(string name)¶
ReturnsThe component object or nil if not exists.
Returns the component attached to the entity.
nameThe name of the component.
YaEntity SelfEntity()¶
ReturnsThe entity.
Returns YaEntity of the current entity.
void AddAutoRemoveListener(table component, string eventName, function handler)¶
Adds a
handler to the component for the eventName event, and removes the handler when the entity is destroyed.
componentAn instance with theAddListener andRemoveListener function, such asYaMoverComponent
1 | |