diff options
Diffstat (limited to 'lib/serpentity/system.js')
| -rw-r--r-- | lib/serpentity/system.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/serpentity/system.js b/lib/serpentity/system.js index 339f6e7..76bf306 100644 --- a/lib/serpentity/system.js +++ b/lib/serpentity/system.js @@ -1,7 +1,5 @@ 'use strict'; -/* global Serpentity */ - /* * Systems contain most of the logic, and work with nodes in order to * act and change their values. @@ -10,12 +8,12 @@ * three methods. They are shown here to document the interface. */ -let System = class System { +const System = class System { /* * This will be run when the system is added to the engine */ - added () { + added() { // Override with added(engine) // Receives an instance of the serpentity engine } @@ -23,7 +21,7 @@ let System = class System { /* * This will be run when the system is removed from the engine */ - removed () { + removed() { // Override with removed(engine) // Receives an instance of the serpentity engine } @@ -31,14 +29,10 @@ let System = class System { /* * This will run every time the engine's update method is called */ - update () { + update() { // Override with update(dt) // Receives a delta of the time } }; -if (typeof module !== 'undefined' && this.module !== module) { - module.exports = System; -} else { - Serpentity.System = System; -} +module.exports = System; |