qiao / ces.js

Component-Entity-System framework for JavaScript games.
185 stars 26 forks source link

More World and System events/signals #1

Closed alexdmiller closed 10 years ago

alexdmiller commented 10 years ago

Two main changes:

  1. System now has addedToWorld and removedFromWorld methods. These can be overridden to listen for these events.
  2. World now has entityAdded and entityRemoved signals (technically, a method which returns a signal). These can be used by a System to listen for specific Entity additions and removals. See README updates or test/world.js for examples.