HostComponent

HostComponent

Provides Host functionality. Expects a child host entity. Host functions include:
Driving animation from the entity's Speech Comoponent
Point of Interest animation

Constructor

new HostComponent()

Methods

attached(entity)

Called when the component was added to an entity

Parameters:
Name Type Description
entity Entity

detached()

Called when the component is removed from an entity

process(tpf)

Called on every render frame

Parameters:
Name Type Description
tpf Number

Time per frame

setupHost(animationComponentChildEntity)

This is called as a then() clause in the AnimationComponentHandler layer loading promise. If the passed in animationComponentChildEntity's namne
matches HostComponent.HOST_CHILD_ENTITY_NAME, this HostComponent is setup. Otherwise, this function does nothing.

Parameters:
Name Type Description
animationComponentChildEntity Entity

animation component entity attempting to setup host