//Augment Module var ITW = (function(itw){ "use strict"; //aliases var components, protot; itw.components = itw.components || Object.create(null); components = itw.components; components.Island = function(){ this.super.call(this); var _init = function(){ // init stuff here var _texMain = EHDI.Assets.images[ "island" ]; this._sprMain = new EHDI.aka.Sprite( _texMain ); this._sprMain.x = this._sprMain.width * -0.5; this._sprMain.y = this._sprMain.height * -0.5; this.addChild( this._sprMain ); this.x = -( this._sprMain.width * 0.5 ); this.y = this._sprMain.height * 0.5; }.bind(this); _init(); } protot = components.Island.prototype = Object.create(EHDI.aka.Container.prototype); protot.constructor = components.Island; protot.super = EHDI.aka.Container; protot.getCollisionArea = function(){ return { x: this.x - this._sprMain.width * 0.425, y: this.y + this._sprMain.height * 0.1, width: this._sprMain.width * 0.8, height: this._sprMain.height * 0.27 }; } protot.resetState = function(){ this.x = ITW.SceneMgr.getStageWidth() + ( this._sprMain.width * 0.5 ); if( ITW.GameMgr.getDebug() === true ){ if( typeof this.pixiCircle !== "undefined" ){ if( this.pixiCircle.parent !== null ) this.removeChild( this.pixiCircle ); } this.pixiCircle = new EHDI.aka.Graphics(); this.pixiCircle.beginFill( 0xFF00FF, 0.5 ); this.pixiCircle.drawRect( -( this._sprMain.width * 0.425 ), this._sprMain.height * 0.1, this._sprMain.width * 0.8, this._sprMain.height * 0.27 ); this.pixiCircle.endFill(); this.addChild( this.pixiCircle ); } } protot.destroy = function(){ this.super.prototype.destroy.call(this, {children: true}); } return itw; }(ITW || Object.create(null)));