]>
git.r.bdr.sh - rbdr/serpentity/blob - lib/serpentity/system.js
339f6e7769479aa87550ae42bbc361e2006f3d2a
3 /* global Serpentity */
6 * Systems contain most of the logic, and work with nodes in order to
7 * act and change their values.
9 * You usually want to inherit from this class and override the
10 * three methods. They are shown here to document the interface.
13 let System
= class System
{
16 * This will be run when the system is added to the engine
19 // Override with added(engine)
20 // Receives an instance of the serpentity engine
24 * This will be run when the system is removed from the engine
27 // Override with removed(engine)
28 // Receives an instance of the serpentity engine
32 * This will run every time the engine's update method is called
35 // Override with update(dt)
36 // Receives a delta of the time
40 if (typeof module
!== 'undefined' && this.module
!== module
) {
41 module
.exports
= System
;
43 Serpentity
.System
= System
;