Upon opening window, all of the running scripts are loaded into WorkerScripts

This commit is contained in:
Daniel Xie
2016-12-14 15:22:12 -06:00
parent 23c036827f
commit 334c144bae
3 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -127,9 +127,13 @@ Script.fromJSON = function(value) {
Reviver.constructors.Script = Script;
//TODO
//Called when the game is loaded. Loads all running scripts (from all servers)
//into worker scripts so that they will start running
function loadAllRunningScripts() {
for (var i = 0; i < AllServers.length; i++) {
var server = AllServers[i];
for (var j = 0; j < server.runningScripts.length; j++) {
addWorkerScript(server.runningScripts[j], server);
}
}
}