var EHDI = EHDI || Object.create(null); EHDI.components = EHDI.components || Object.create(null); EHDI.components.Background = function(texture) { PIXI.extras.TilingSprite.call(this, texture, EHDI.GAME.sceneManager.getStageWidth(), EHDI.GAME.sceneManager.getStageHeight()); //EHDI.aka.Sprite.call(this, texture); }; EHDI.components.Background.prototype = Object.create(PIXI.extras.TilingSprite.prototype); //EHDI.components.Background.prototype = Object.create(EHDI.aka.Sprite.prototype); EHDI.components.Background.prototype.moveBackground = function (distance) { this.tilePosition.x -= distance * 96; };