mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
27 lines
No EOL
546 B
JavaScript
Executable file
27 lines
No EOL
546 B
JavaScript
Executable file
define([
|
|
"Game/Core/Loader/Level",
|
|
"Game/Config/Settings",
|
|
"fs"
|
|
],
|
|
|
|
function (Parent, Settings, FileSystem) {
|
|
|
|
"use strict";
|
|
|
|
function Level (uid, engine, gameObjects) {
|
|
Parent.call(this, uid, engine, gameObjects);
|
|
}
|
|
|
|
Level.prototype = Object.create(Parent.prototype);
|
|
|
|
Level.prototype.loadLevelDataFromPath = function (path, callback) {
|
|
// overwriting parent
|
|
|
|
FileSystem.readFile(path, "utf8", function (err, data) {
|
|
if (err) throw err;
|
|
callback(JSON.parse(data));
|
|
});
|
|
}
|
|
|
|
return Level;
|
|
}); |