mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
moved some classes, added layer manager
This commit is contained in:
parent
1d3ad16a07
commit
b5c70687d8
11 changed files with 292 additions and 177 deletions
|
|
@ -2,10 +2,11 @@ define([
|
|||
"Game/Core/Loader/Level",
|
||||
"Game/Config/Settings",
|
||||
"Lib/Utilities/NotificationCenter",
|
||||
"Lib/Vendor/Pixi"
|
||||
"Lib/Vendor/Pixi",
|
||||
"Game/Client/View/Abstract/Layer"
|
||||
],
|
||||
|
||||
function (Parent, Settings, Nc, PIXI) {
|
||||
function (Parent, Settings, Nc, PIXI, AbstractLayer) {
|
||||
|
||||
function Level (uid, engine, gameObjects) {
|
||||
Parent.call(this, uid, engine, gameObjects);
|
||||
|
|
@ -13,7 +14,6 @@ function (Parent, Settings, Nc, PIXI) {
|
|||
|
||||
Level.prototype = Object.create(Parent.prototype);
|
||||
|
||||
|
||||
Level.prototype.loadLevelDataFromPath = function (path, callback) {
|
||||
var self = this;
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
|
@ -90,7 +90,7 @@ function (Parent, Settings, Nc, PIXI) {
|
|||
|
||||
Level.prototype.createItems = function(options) {
|
||||
|
||||
var layerName = "items";
|
||||
var layerName = AbstractLayer.ID.ITEM;
|
||||
Nc.trigger(Nc.ns.client.view.layer.createAndAdd, layerName);
|
||||
options.layer = layerName;
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ function (Parent, Settings, Nc, PIXI) {
|
|||
|
||||
Level.prototype.createTiles = function(options) {
|
||||
|
||||
var layerName = "tiles";
|
||||
var layerName = AbstractLayer.ID.TILE;
|
||||
Nc.trigger(Nc.ns.client.view.layer.createAndAdd, layerName);
|
||||
options.layer = layerName;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue