Using timers in code is error-prone, especially as timers are often tied to specific entities. Instead, we should explicitly tie the timer to the entity via a component. We can then process timers in a system that tracks entities with said components. We can map the existing setTimeout and setInterval to either an implicit entity, or finally have App extend Entity.
Using timers in code is error-prone, especially as timers are often tied to specific entities. Instead, we should explicitly tie the timer to the entity via a component. We can then process timers in a system that tracks entities with said components. We can map the existing
setTimeout
andsetInterval
to either an implicit entity, or finally haveApp
extendEntity
.