AetherInteractiveLtd/Tina

Process class should be an EventEmitter

Closed this issue · 0 comments

The Process class should almost definitely be an EventEmitter instead, EventEmitter will need a tad of work to allow for blank .when()s.

My rationale for this is that;

  1. You would want a dt: number for the amount of time since the last scheduler call happened.
  2. To have this dt: number you would need to only use .do() once because the first .do() return is chained into the second one and so forth.

Tasks

  • Switch to EventEmitter for Processes.
  • Allow key-less EventEmitter declarations (i.e. through a default field in the interfaces that declare events)
  • Implement a delta-time event parameter for Processes.