]> git.r.bdr.sh - rbdr/serpentity/blob - lib/serpentity/system.js
76bf30609f53991f6e0c08fc93f2f740ced5600b
[rbdr/serpentity] / lib / serpentity / system.js
1 'use strict';
2
3 /*
4 * Systems contain most of the logic, and work with nodes in order to
5 * act and change their values.
6 *
7 * You usually want to inherit from this class and override the
8 * three methods. They are shown here to document the interface.
9 */
10
11 const System = class System {
12
13 /*
14 * This will be run when the system is added to the engine
15 */
16 added() {
17 // Override with added(engine)
18 // Receives an instance of the serpentity engine
19 }
20
21 /*
22 * This will be run when the system is removed from the engine
23 */
24 removed() {
25 // Override with removed(engine)
26 // Receives an instance of the serpentity engine
27 }
28
29 /*
30 * This will run every time the engine's update method is called
31 */
32 update() {
33 // Override with update(dt)
34 // Receives a delta of the time
35 }
36 };
37
38 module.exports = System;