]> git.r.bdr.sh - rbdr/serpentity/blob - lib/serpentity/system.js
c817be10e37170569125fae2f9649e3ba94d8765
[rbdr/serpentity] / lib / serpentity / system.js
1 /*
2 * Systems contain most of the logic, and work with nodes in order to
3 * act and change their values.
4 *
5 * You usually want to inherit from this class and override the
6 * three methods.
7 */
8 Class(Serpentity, "System")({
9 prototype : {
10
11 /*
12 * This will be run when the system is added to the engine
13 */
14 added : function added(engine) {
15 // Override
16 },
17
18 /*
19 * This will be run when the system is removed from the engine
20 */
21 removed : function removed(engine) {
22 // Override
23 },
24
25 /*
26 * This will run every time the engine's update method is called
27 */
28 update : function update(dt) {
29 // Override
30 }
31 }
32 });