+
+Class("LowProTestSystem").inherits(Serpentity.System)({
+ prototype : {
+ added : function added(engine) {
+ this.testNodes = engine.getNodes(TestNode);
+ console.log("System added callback: " + "EXEC OK".green);
+ },
+
+ removed : function removed(engine) {
+ this.testNodes = null;
+ console.log("System removed callback: " + "EXEC OK".green);
+ },
+
+ update : function update(dt) {
+ this.testNodes.forEach(function (node) {
+ console.log("Running Low Priority Node: " + (node.test.testMessage === "test" ? "SYSTEM OK".green : "FAIL".RED));
+ });
+ console.log("System update callback: " + "EXEC OK".green);
+ }
+ }
+});
+var lowProTestSystem = new LowProTestSystem();
+console.log("LowProTestSystem: " + "CREATE OK".green)
+
+Class("MidProTestSystem").inherits(Serpentity.System)({
+ prototype : {
+ added : function added(engine) {
+ this.testNodes = engine.getNodes(TestNode);
+ console.log("System added callback: " + "EXEC OK".green);
+ },
+
+ removed : function removed(engine) {
+ this.testNodes = null;
+ console.log("System removed callback: " + "EXEC OK".green);
+ },
+
+ update : function update(dt) {
+ this.testNodes.forEach(function (node) {
+ console.log("Running Mid Priority Node: " + (node.test.testMessage === "test" ? "SYSTEM OK".green : "FAIL".RED));
+ });
+ console.log("System update callback: " + "EXEC OK".green);
+ }
+ }
+});
+var midProTestSystem = new MidProTestSystem();
+console.log("MidProTestSystem: " + "CREATE OK".green)