chuck.js/app/Game/Client/View/Abstract/Layer.js
2014-08-30 14:47:31 +02:00

33 lines
No EOL
971 B
JavaScript

define([
"Lib/Utilities/Abstract",
],
function (Abstract) {
function Layer(name, z, parallaxSpeed) {
this.name = name;
this.parallaxSpeed = parallaxSpeed;
}
Object.defineProperty(Layer, 'ID', {
value: {
TILE: 'tile',
ITEM: 'item',
SPAWN: 'spawn'
}
});
Abstract.prototype.addMethod.call(Layer, 'show');
Abstract.prototype.addMethod.call(Layer, 'hide');
Abstract.prototype.addMethod.call(Layer, 'createMesh', ['texturePath', 'callback', 'options']);
Abstract.prototype.addMethod.call(Layer, 'createAnimatedMesh', ['texturePaths', 'callback', 'options']);
Abstract.prototype.addMethod.call(Layer, 'addMesh', ['mesh']);
Abstract.prototype.addMethod.call(Layer, 'removeMesh', ['mesh']);
Abstract.prototype.addMethod.call(Layer, 'updateMesh', ['mesh', 'options']);
Layer.prototype.getName = function() {
return this.name;
};
return Layer;
});