//Augment Module var ITW = (function(itw){ "use strict"; //aliases var components, protot, _this, _super; itw.components = itw.components || Object.create(null); components = itw.components; var _armature, _player; components.PlayerSplash = function( player ){ this.super.call(this); _this = this; _super = _this.super; var onComplete = function(){ _this.alpha = 0; } var _init = function(){ _armature = ITW.DBoneFactory.createArmature( "Splash" ); _armature.addEventListener(dragonBones.AnimationEvent.COMPLETE, onComplete); _this.addChild(_armature.display); _player = player; _this.x = player.width * 0.98; _this.y = player.height * 1.01; _this.alpha = 0; } this.destroyArmature = function(){ _armature.removeEventListener(dragonBones.AnimationEvent.COMPLETE, onComplete); ITW.DBoneFactory.destroyArmature( _armature ); } _init(); } protot = components.PlayerSplash.prototype = Object.create(EHDI.aka.Container.prototype); protot.constructor = components.PlayerSplash; protot.super = EHDI.aka.Container; protot.play = function(){ _this.alpha = 1; _armature.animation.gotoAndPlay("fx_splash" , -1, -1 ,1); } protot.destroy = function(){ this.destroyArmature(); _super.prototype.destroy.call(this, {children: true}); } return itw; }(ITW || Object.create(null)))