2014-04-01 02:02:36 +00:00
/* Phaser (no physics) v2.0.3 - http://phaser.io - @photonstorm - (c) 2014 Photon Storm Ltd. */
( function ( ) { var a = this , b = b || { } ; b . WEBGL _RENDERER = 0 , b . CANVAS _RENDERER = 1 , b . VERSION = "v1.5.2" , b . blendModes = { NORMAL : 0 , ADD : 1 , MULTIPLY : 2 , SCREEN : 3 , OVERLAY : 4 , DARKEN : 5 , LIGHTEN : 6 , COLOR _DODGE : 7 , COLOR _BURN : 8 , HARD _LIGHT : 9 , SOFT _LIGHT : 10 , DIFFERENCE : 11 , EXCLUSION : 12 , HUE : 13 , SATURATION : 14 , COLOR : 15 , LUMINOSITY : 16 } , b . scaleModes = { DEFAULT : 0 , LINEAR : 0 , NEAREST : 1 } , b . INTERACTION _FREQUENCY = 30 , b . AUTO _PREVENT _DEFAULT = ! 0 , b . RAD _TO _DEG = 180 / Math . PI , b . DEG _TO _RAD = Math . PI / 180 , b . Point = function ( a , b ) { this . x = a || 0 , this . y = b || 0 } , b . Point . prototype . clone = function ( ) { return new b . Point ( this . x , this . y ) } , b . Point . prototype . constructor = b . Point , b . Point . prototype . set = function ( a , b ) { this . x = a || 0 , this . y = b || ( 0 !== b ? this . x : 0 ) } , b . Rectangle = function ( a , b , c , d ) { this . x = a || 0 , this . y = b || 0 , this . width = c || 0 , this . height = d || 0 } , b . Rectangle . prototype . clone = function ( ) { return new b . Rectangle ( this . x , this . y , this . width , this . height ) } , b . Rectangle . prototype . contains = function ( a , b ) { if ( this . width <= 0 || this . height <= 0 ) return ! 1 ; var c = this . x ; if ( a >= c && a <= c + this . width ) { var d = this . y ; if ( b >= d && b <= d + this . height ) return ! 0 } return ! 1 } , b . Rectangle . prototype . constructor = b . Rectangle , b . EmptyRectangle = new b . Rectangle ( 0 , 0 , 0 , 0 ) , b . Polygon = function ( a ) { if ( a instanceof Array || ( a = Array . prototype . slice . call ( arguments ) ) , "number" == typeof a [ 0 ] ) { for ( var c = [ ] , d = 0 , e = a . length ; e > d ; d += 2 ) c . push ( new b . Point ( a [ d ] , a [ d + 1 ] ) ) ; a = c } this . points = a } , b . Polygon . prototype . clone = function ( ) { for ( var a = [ ] , c = 0 ; c < this . points . length ; c ++ ) a . push ( this . points [ c ] . clone ( ) ) ; return new b . Polygon ( a ) } , b . Polygon . prototype . contains = function ( a , b ) { for ( var c = ! 1 , d = 0 , e = this . points . length - 1 ; d < this . points . length ; e = d ++ ) { var f = this . points [ d ] . x , g = this . points [ d ] . y , h = this . points [ e ] . x , i = this . points [ e ] . y , j = g > b != i > b && ( h - f ) * ( b - g ) / ( i - g ) + f > a ; j && ( c = ! c ) } return c } , b . Polygon . prototype . constructor = b . Polygon , b . Circle = function ( a , b , c ) { this . x = a || 0 , this . y = b || 0 , this . radius = c || 0 } , b . Circle . prototype . clone = function ( ) { return new b . Circle ( this . x , this . y , this . radius ) } , b . Circle . prototype . contains = function ( a , b ) { if ( this . radius <= 0 ) return ! 1 ; var c = this . x - a , d = this . y - b , e = this . radius * this . radius ; return c *= c , d *= d , e >= c + d } , b . Circle . prototype . constructor = b . Circle , b . Ellipse = function ( a , b , c , d ) { this . x = a || 0 , this . y = b || 0 , this . width = c || 0 , this . height = d || 0 } , b . Ellipse . prototype . clone = function ( ) { return new b . Ellipse ( this . x , this . y , this . width , this . height ) } , b . Ellipse . prototype . contains = function ( a , b ) { if ( this . width <= 0 || this . height <= 0 ) return ! 1 ; var c = ( a - this . x ) / this . width , d = ( b - this . y ) / this . height ; return c *= c , d *= d , 1 >= c + d } , b . Ellipse . prototype . getBounds = function ( ) { return new b . Rectangle ( this . x , this . y , this . width , this . height ) } , b . Ellipse . prototype . constructor = b . Ellipse , b . determineMatrixArrayType = function ( ) { return "undefined" != typeof Float32Array ? Float32Array : Array } , b . Matrix2 = b . determineMatrixArrayType ( ) , b . Matrix = function ( ) { this . a = 1 , this . b = 0 , this . c = 0 , this . d = 1 , this . tx = 0 , this . ty = 0 } , b . Matrix . prototype . fromArray = function ( a ) { this . a = a [ 0 ] , this . b = a [ 1 ] , this . c = a [ 3 ] , this . d = a [ 4 ] , this . tx = a [ 2 ] , this . ty = a [ 5 ] } , b . Matrix . prototype . toArray = function ( a ) { this . array || ( this . array = new Float32Array ( 9 ) ) ; var b = this . array ; return a ? ( this . array [ 0 ] = this . a , this . array [ 1 ] = this . c , this . array [ 2 ] = 0 , this . array [ 3 ] = this . b , this . array [ 4 ] = this . d , this . array [ 5 ] = 0 , this . array [ 6 ] = this . tx , this . array [ 7 ] = this . ty , this . array [ 8 ] = 1 ) : ( this . array [ 0 ] = this . a , this . array [ 1 ] = this . b , this . array [ 2 ] = this . tx , this . array [ 3 ] = this . c , this . array [ 4 ] = this . d , this . array [ 5 ] = this . ty , this . array [ 6 ] = 0 , this . array [ 7 ] = 0 , this . array [ 8 ] = 1 ) , b } , b . identityMatrix = new b . Matrix , b . DisplayObject = function ( ) { this . position = new b . Point , this . scale = new b . Point ( 1 , 1 ) , this . pivot = new b . Point ( 0 , 0 ) , this . rotation = 0 , this . alpha = 1 , this . visible = ! 0 , this . hitArea = null , this . buttonMode = ! 1 , this . renderable = ! 1 , this . parent = null , this . stage = null , this . worldAlpha = 1 , this . _interactive = ! 1 , this . defaultCursor = "pointer" , this . worldTransform = new b . Matrix , this . color = [ ] , this . dynamic = ! 0 , this . _sr = 0 , this . _cr = 1 , this . filterArea = null , this . _bounds = new b . Rectangle ( 0 , 0 , 1 , 1 ) , this . _currentBounds = null , this . _mask = null , this . _cacheAsBitmap = ! 1 , this . _cacheIsDirty = ! 1 } , b . DisplayObject . prototype . constructor = b . DisplayObject , b . DisplayObject . prototype . setInteractive = function ( a ) { this . interactive = a } , Object . defineProp
} , b . PixiFastShader . prototype . init = function ( ) { var a = this . gl , c = b . compileProgram ( a , this . vertexSrc , this . fragmentSrc ) ; a . useProgram ( c ) , this . uSampler = a . getUniformLocation ( c , "uSampler" ) , this . projectionVector = a . getUniformLocation ( c , "projectionVector" ) , this . offsetVector = a . getUniformLocation ( c , "offsetVector" ) , this . dimensions = a . getUniformLocation ( c , "dimensions" ) , this . uMatrix = a . getUniformLocation ( c , "uMatrix" ) , this . aVertexPosition = a . getAttribLocation ( c , "aVertexPosition" ) , this . aPositionCoord = a . getAttribLocation ( c , "aPositionCoord" ) , this . aScale = a . getAttribLocation ( c , "aScale" ) , this . aRotation = a . getAttribLocation ( c , "aRotation" ) , this . aTextureCoord = a . getAttribLocation ( c , "aTextureCoord" ) , this . colorAttribute = a . getAttribLocation ( c , "aColor" ) , - 1 === this . colorAttribute && ( this . colorAttribute = 2 ) , this . attributes = [ this . aVertexPosition , this . aPositionCoord , this . aScale , this . aRotation , this . aTextureCoord , this . colorAttribute ] , this . program = c } , b . PixiFastShader . prototype . destroy = function ( ) { this . gl . deleteProgram ( this . program ) , this . uniforms = null , this . gl = null , this . attributes = null } , b . StripShader = function ( ) { this . program = null , this . fragmentSrc = [ "precision mediump float;" , "varying vec2 vTextureCoord;" , "varying float vColor;" , "uniform float alpha;" , "uniform sampler2D uSampler;" , "void main(void) {" , " gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y));" , " gl_FragColor = gl_FragColor * alpha;" , "}" ] , this . vertexSrc = [ "attribute vec2 aVertexPosition;" , "attribute vec2 aTextureCoord;" , "attribute float aColor;" , "uniform mat3 translationMatrix;" , "uniform vec2 projectionVector;" , "varying vec2 vTextureCoord;" , "uniform vec2 offsetVector;" , "varying float vColor;" , "void main(void) {" , " vec3 v = translationMatrix * vec3(aVertexPosition, 1.0);" , " v -= offsetVector.xyx;" , " gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / projectionVector.y + 1.0 , 0.0, 1.0);" , " vTextureCoord = aTextureCoord;" , " vColor = aColor;" , "}" ] } , b . StripShader . prototype . init = function ( ) { var a = b . gl , c = b . compileProgram ( a , this . vertexSrc , this . fragmentSrc ) ; a . useProgram ( c ) , this . uSampler = a . getUniformLocation ( c , "uSampler" ) , this . projectionVector = a . getUniformLocation ( c , "projectionVector" ) , this . offsetVector = a . getUniformLocation ( c , "offsetVector" ) , this . colorAttribute = a . getAttribLocation ( c , "aColor" ) , this . aVertexPosition = a . getAttribLocation ( c , "aVertexPosition" ) , this . aTextureCoord = a . getAttribLocation ( c , "aTextureCoord" ) , this . translationMatrix = a . getUniformLocation ( c , "translationMatrix" ) , this . alpha = a . getUniformLocation ( c , "alpha" ) , this . program = c } , b . PrimitiveShader = function ( a ) { this . gl = a , this . program = null , this . fragmentSrc = [ "precision mediump float;" , "varying vec4 vColor;" , "void main(void) {" , " gl_FragColor = vColor;" , "}" ] , this . vertexSrc = [ "attribute vec2 aVertexPosition;" , "attribute vec4 aColor;" , "uniform mat3 translationMatrix;" , "uniform vec2 projectionVector;" , "uniform vec2 offsetVector;" , "uniform float alpha;" , "uniform vec3 tint;" , "varying vec4 vColor;" , "void main(void) {" , " vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);" , " v -= offsetVector.xyx;" , " gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);" , " vColor = aColor * vec4(tint * alpha, alpha);" , "}" ] , this . init ( ) } , b . PrimitiveShader . prototype . init = function ( ) { var a = this . gl , c = b . compileProgram ( a , this . vertexSrc , this . fragmentSrc ) ; a . useProgram ( c ) , this . projectionVector = a . getUniformLocation ( c , "projectionVector" ) , this . offsetVector = a . getUniformLocation ( c , "offsetVector" ) , this . tintColor = a . getUniformLocation ( c , "tint" ) , this . aVertexPosition = a . getAttribLocation ( c , "aVertexPosition" ) , this . colorAttribute = a . getAttribLocation ( c , "aColor" ) , this . attributes = [ this . aVertexPosition , this . colorAttribute ] , this . translationMatrix = a . getUniformLocation ( c , "translationMatrix" ) , this . alpha = a . getUniformLocation ( c , "alpha" ) , this . program = c } , b . PrimitiveShader . prototype . destroy = function ( ) { this . gl . deleteProgram ( this . program ) , this . uniforms = null , this . gl = null , this . attribute = null } , b . WebGLGraphics = function ( ) { } , b . WebGLGraphics . renderGraphics = function ( a , c ) { var d = c . gl , e = c . projection , f = c . offset , g = c . shaderManager . primitiveShader ; a . _w
} , b . WebGLFilterManager . prototype . applyFilterPass = function ( a , c , d , e ) { var f = this . gl , g = a . shaders [ f . id ] ; g || ( g = new b . PixiShader ( f ) , g . fragmentSrc = a . fragmentSrc , g . uniforms = a . uniforms , g . init ( ) , a . shaders [ f . id ] = g ) , f . useProgram ( g . program ) , f . uniform2f ( g . projectionVector , d / 2 , - e / 2 ) , f . uniform2f ( g . offsetVector , 0 , 0 ) , a . uniforms . dimensions && ( a . uniforms . dimensions . value [ 0 ] = this . width , a . uniforms . dimensions . value [ 1 ] = this . height , a . uniforms . dimensions . value [ 2 ] = this . vertexArray [ 0 ] , a . uniforms . dimensions . value [ 3 ] = this . vertexArray [ 5 ] ) , g . syncUniforms ( ) , f . bindBuffer ( f . ARRAY _BUFFER , this . vertexBuffer ) , f . vertexAttribPointer ( g . aVertexPosition , 2 , f . FLOAT , ! 1 , 0 , 0 ) , f . bindBuffer ( f . ARRAY _BUFFER , this . uvBuffer ) , f . vertexAttribPointer ( g . aTextureCoord , 2 , f . FLOAT , ! 1 , 0 , 0 ) , f . bindBuffer ( f . ARRAY _BUFFER , this . colorBuffer ) , f . vertexAttribPointer ( g . colorAttribute , 2 , f . FLOAT , ! 1 , 0 , 0 ) , f . bindBuffer ( f . ELEMENT _ARRAY _BUFFER , this . indexBuffer ) , f . drawElements ( f . TRIANGLES , 6 , f . UNSIGNED _SHORT , 0 ) , this . renderSession . drawCount ++ } , b . WebGLFilterManager . prototype . initShaderBuffers = function ( ) { var a = this . gl ; this . vertexBuffer = a . createBuffer ( ) , this . uvBuffer = a . createBuffer ( ) , this . colorBuffer = a . createBuffer ( ) , this . indexBuffer = a . createBuffer ( ) , this . vertexArray = new Float32Array ( [ 0 , 0 , 1 , 0 , 0 , 1 , 1 , 1 ] ) , a . bindBuffer ( a . ARRAY _BUFFER , this . vertexBuffer ) , a . bufferData ( a . ARRAY _BUFFER , this . vertexArray , a . STATIC _DRAW ) , this . uvArray = new Float32Array ( [ 0 , 0 , 1 , 0 , 0 , 1 , 1 , 1 ] ) , a . bindBuffer ( a . ARRAY _BUFFER , this . uvBuffer ) , a . bufferData ( a . ARRAY _BUFFER , this . uvArray , a . STATIC _DRAW ) , this . colorArray = new Float32Array ( [ 1 , 16777215 , 1 , 16777215 , 1 , 16777215 , 1 , 16777215 ] ) , a . bindBuffer ( a . ARRAY _BUFFER , this . colorBuffer ) , a . bufferData ( a . ARRAY _BUFFER , this . colorArray , a . STATIC _DRAW ) , a . bindBuffer ( a . ELEMENT _ARRAY _BUFFER , this . indexBuffer ) , a . bufferData ( a . ELEMENT _ARRAY _BUFFER , new Uint16Array ( [ 0 , 1 , 2 , 1 , 3 , 2 ] ) , a . STATIC _DRAW ) } , b . WebGLFilterManager . prototype . destroy = function ( ) { var a = this . gl ; this . filterStack = null , this . offsetX = 0 , this . offsetY = 0 ; for ( var b = 0 ; b < this . texturePool . length ; b ++ ) this . texturePool . destroy ( ) ; this . texturePool = null , a . deleteBuffer ( this . vertexBuffer ) , a . deleteBuffer ( this . uvBuffer ) , a . deleteBuffer ( this . colorBuffer ) , a . deleteBuffer ( this . indexBuffer ) } , b . FilterTexture = function ( a , b , c ) { this . gl = a , this . frameBuffer = a . createFramebuffer ( ) , this . texture = a . createTexture ( ) , a . bindTexture ( a . TEXTURE _2D , this . texture ) , a . texParameteri ( a . TEXTURE _2D , a . TEXTURE _MAG _FILTER , a . LINEAR ) , a . texParameteri ( a . TEXTURE _2D , a . TEXTURE _MIN _FILTER , a . LINEAR ) , a . texParameteri ( a . TEXTURE _2D , a . TEXTURE _WRAP _S , a . CLAMP _TO _EDGE ) , a . texParameteri ( a . TEXTURE _2D , a . TEXTURE _WRAP _T , a . CLAMP _TO _EDGE ) , a . bindFramebuffer ( a . FRAMEBUFFER , this . framebuffer ) , a . bindFramebuffer ( a . FRAMEBUFFER , this . frameBuffer ) , a . framebufferTexture2D ( a . FRAMEBUFFER , a . COLOR _ATTACHMENT0 , a . TEXTURE _2D , this . texture , 0 ) , this . resize ( b , c ) } , b . FilterTexture . prototype . clear = function ( ) { var a = this . gl ; a . clearColor ( 0 , 0 , 0 , 0 ) , a . clear ( a . COLOR _BUFFER _BIT ) } , b . FilterTexture . prototype . resize = function ( a , b ) { if ( this . width !== a || this . height !== b ) { this . width = a , this . height = b ; var c = this . gl ; c . bindTexture ( c . TEXTURE _2D , this . texture ) , c . texImage2D ( c . TEXTURE _2D , 0 , c . RGBA , a , b , 0 , c . RGBA , c . UNSIGNED _BYTE , null ) } } , b . FilterTexture . prototype . destroy = function ( ) { var a = this . gl ; a . deleteFramebuffer ( this . frameBuffer ) , a . deleteTexture ( this . texture ) , this . frameBuffer = null , this . texture = null } , b . CanvasMaskManager = function ( ) { } , b . CanvasMaskManager . prototype . pushMask = function ( a , c ) { c . save ( ) ; var d = a . alpha , e = a . worldTransform ; c . setTransform ( e . a , e . c , e . b , e . d , e . tx , e . ty ) , b . CanvasGraphics . renderGraphicsMask ( a , c ) , c . clip ( ) , a . worldAlpha = d } , b . CanvasMaskManager . prototype . popMask = function ( a ) { a . restore ( ) } , b . CanvasTinter = function ( ) { } , b . CanvasTinter . getTintedTexture = function ( a , c ) { var d = a . texture ; c = b . CanvasTinter . roundColor ( c ) ; var e = "#" + ( "00000" + ( 0 | c ) . toString ( 16 ) ) . substr ( - 6 ) ; if ( d . tintCache = d . tintCache || { } , d . tintCache [ e ] ) return d . tintCache [ e ] ; var f = b . CanvasTinter . canvas || document . createElement ( "canvas" ) ; if ( b . CanvasTinter . tintMethod ( d , c , f ) , b . CanvasTinter . convertTintToImage ) { var g = new Image ; g . src = f . toDataURL ( ) , d . tintCache [ e ] = g } else d . tintCache [ e ] = f , b . CanvasTinter . canvas = null ; return f } , b . CanvasTinter . tintWithMultiply = function ( a , b , c ) { v
var e = 0 ; if ( b + 1 >= a . length ) switch ( d ) { case 1 : a = new Array ( b + 1 - a . length ) . join ( c ) + a ; break ; case 3 : var f = Math . ceil ( ( e = b - a . length ) / 2 ) , g = e - f ; a = new Array ( g + 1 ) . join ( c ) + a + new Array ( f + 1 ) . join ( c ) ; break ; default : a += new Array ( b + 1 - a . length ) . join ( c ) } return a } , isPlainObject : function ( a ) { if ( "object" != typeof a || a . nodeType || a === a . window ) return ! 1 ; try { if ( a . constructor && ! { } . hasOwnProperty . call ( a . constructor . prototype , "isPrototypeOf" ) ) return ! 1 } catch ( b ) { return ! 1 } return ! 0 } , extend : function ( ) { var a , c , d , e , f , g , h = arguments [ 0 ] || { } , i = 1 , j = arguments . length , k = ! 1 ; for ( "boolean" == typeof h && ( k = h , h = arguments [ 1 ] || { } , i = 2 ) , j === i && ( h = this , -- i ) ; j > i ; i ++ ) if ( null != ( a = arguments [ i ] ) ) for ( c in a ) d = h [ c ] , e = a [ c ] , h !== e && ( k && e && ( b . Utils . isPlainObject ( e ) || ( f = Array . isArray ( e ) ) ) ? ( f ? ( f = ! 1 , g = d && Array . isArray ( d ) ? d : [ ] ) : g = d && b . Utils . isPlainObject ( d ) ? d : { } , h [ c ] = b . Utils . extend ( k , g , e ) ) : void 0 !== e && ( h [ c ] = e ) ) ; return h } } , "function" != typeof Function . prototype . bind && ( Function . prototype . bind = function ( ) { var a = Array . prototype . slice ; return function ( b ) { function c ( ) { var f = e . concat ( a . call ( arguments ) ) ; d . apply ( this instanceof c ? this : b , f ) } var d = this , e = a . call ( arguments , 1 ) ; if ( "function" != typeof d ) throw new TypeError ; return c . prototype = function f ( a ) { return a && ( f . prototype = a ) , this instanceof f ? void 0 : new f } ( d . prototype ) , c } } ( ) ) , Array . isArray || ( Array . isArray = function ( a ) { return "[object Array]" == Object . prototype . toString . call ( a ) } ) , b . Circle = function ( a , b , c ) { a = a || 0 , b = b || 0 , c = c || 0 , this . x = a , this . y = b , this . _diameter = c , this . _radius = c > 0 ? . 5 * c : 0 } , b . Circle . prototype = { circumference : function ( ) { return 2 * Math . PI * this . _radius } , setTo : function ( a , b , c ) { return this . x = a , this . y = b , this . _diameter = c , this . _radius = . 5 * c , this } , copyFrom : function ( a ) { return this . setTo ( a . x , a . y , a . diameter ) } , copyTo : function ( a ) { return a . x = this . x , a . y = this . y , a . diameter = this . _diameter , a } , distance : function ( a , c ) { return "undefined" == typeof c && ( c = ! 1 ) , c ? b . Math . distanceRound ( this . x , this . y , a . x , a . y ) : b . Math . distance ( this . x , this . y , a . x , a . y ) } , clone : function ( a ) { return "undefined" == typeof a ? a = new b . Circle ( this . x , this . y , this . diameter ) : a . setTo ( this . x , this . y , this . diameter ) , a } , contains : function ( a , c ) { return b . Circle . contains ( this , a , c ) } , circumferencePoint : function ( a , c , d ) { return b . Circle . circumferencePoint ( this , a , c , d ) } , offset : function ( a , b ) { return this . x += a , this . y += b , this } , offsetPoint : function ( a ) { return this . offset ( a . x , a . y ) } , toString : function ( ) { return "[{Phaser.Circle (x=" + this . x + " y=" + this . y + " diameter=" + this . diameter + " radius=" + this . radius + ")}]" } } , b . Circle . prototype . constructor = b . Circle , Object . defineProperty ( b . Circle . prototype , "diameter" , { get : function ( ) { return this . _diameter } , set : function ( a ) { a > 0 && ( this . _diameter = a , this . _radius = . 5 * a ) } } ) , Object . defineProperty ( b . Circle . prototype , "radius" , { get : function ( ) { return this . _radius } , set : function ( a ) { a > 0 && ( this . _radius = a , this . _diameter = 2 * a ) } } ) , Object . defineProperty ( b . Circle . prototype , "left" , { get : function ( ) { return this . x - this . _radius } , set : function ( a ) { a > this . x ? ( this . _radius = 0 , this . _diameter = 0 ) : this . radius = this . x - a } } ) , Object . defineProperty ( b . Circle . prototype , "right" , { get : function ( ) { return this . x + this . _radius } , set : function ( a ) { a < this . x ? ( this . _radius = 0 , this . _diameter = 0 ) : this . radius = a - this . x } } ) , Object . defineProperty ( b . Circle . prototype , "top" , { get : function ( ) { return this . y - this . _radius } , set : function ( a ) { a > this . y ? ( this . _radius = 0 , this . _diameter = 0 ) : this . radius = this . y - a } } ) , Object . defineProperty ( b . Circle . prototype , "bottom" , { get : function ( ) { return this . y + this . _radius } , set : function ( a ) { a < this . y ? ( this . _radius = 0 , this . _diameter = 0 ) : this . radius = a - this . y } } ) , Object . defineProperty ( b . Circle . prototype , "area" , { get : function ( ) { return this . _radius > 0 ? Math . PI * this . _radius * this . _radius : 0 } } ) , Object . defineProperty ( b . Circle . prototype , "empty" , { get : function ( ) { return 0 === this . _diameter } , set : function ( a ) { a === ! 0 && this . setTo ( 0 , 0 , 0 ) } } ) , b . Circle . contains = function ( a , b , c ) { if ( a . radius > 0 && b >= a . left && b <= a . right && c >= a . top && c <= a . bottom ) { var d = ( a . x - b ) * ( a . x - b ) , e = ( a . y - c ) * ( a . y - c ) ; return d + e <= a . radius * a . radius } return ! 1 } , b . Circle . equals = function ( a , b ) { return a . x == b . x && a . y == b . y && a . diameter == b . diameter } , b . Circle . intersects = function ( a , c ) { return b . Math . distance ( a . x , a . y , c . x , c . y ) <= a . radius + c . radius } , b . Circle . circumferencePoint =
} , destroy : function ( ) { this . game = null } } , b . Filter . prototype . constructor = b . Filter , Object . defineProperty ( b . Filter . prototype , "width" , { get : function ( ) { return this . uniforms . resolution . value . x } , set : function ( a ) { this . uniforms . resolution . value . x = a } } ) , Object . defineProperty ( b . Filter . prototype , "height" , { get : function ( ) { return this . uniforms . resolution . value . y } , set : function ( a ) { this . uniforms . resolution . value . y = a } } ) , b . Plugin = function ( a , b ) { "undefined" == typeof b && ( b = null ) , this . game = a , this . parent = b , this . active = ! 1 , this . visible = ! 1 , this . hasPreUpdate = ! 1 , this . hasUpdate = ! 1 , this . hasPostUpdate = ! 1 , this . hasRender = ! 1 , this . hasPostRender = ! 1 } , b . Plugin . prototype = { preUpdate : function ( ) { } , update : function ( ) { } , render : function ( ) { } , postRender : function ( ) { } , destroy : function ( ) { this . game = null , this . parent = null , this . active = ! 1 , this . visible = ! 1 } } , b . Plugin . prototype . constructor = b . Plugin , b . PluginManager = function ( a , b ) { this . game = a , this . _parent = b , this . plugins = [ ] , this . _pluginsLength = 0 } , b . PluginManager . prototype = { add : function ( a ) { var b = ! 1 ; return "function" == typeof a ? a = new a ( this . game , this . _parent ) : ( a . game = this . game , a . parent = this . _parent ) , "function" == typeof a . preUpdate && ( a . hasPreUpdate = ! 0 , b = ! 0 ) , "function" == typeof a . update && ( a . hasUpdate = ! 0 , b = ! 0 ) , "function" == typeof a . postUpdate && ( a . hasPostUpdate = ! 0 , b = ! 0 ) , "function" == typeof a . render && ( a . hasRender = ! 0 , b = ! 0 ) , "function" == typeof a . postRender && ( a . hasPostRender = ! 0 , b = ! 0 ) , b ? ( ( a . hasPreUpdate || a . hasUpdate || a . hasPostUpdate ) && ( a . active = ! 0 ) , ( a . hasRender || a . hasPostRender ) && ( a . visible = ! 0 ) , this . _pluginsLength = this . plugins . push ( a ) , "function" == typeof a . init && a . init ( ) , a ) : null } , remove : function ( a ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) if ( this . plugins [ this . _p ] === a ) return a . destroy ( ) , this . plugins . splice ( this . _p , 1 ) , void this . _pluginsLength -- } , removeAll : function ( ) { for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . destroy ( ) ; this . plugins . length = 0 , this . _pluginsLength = 0 } , preUpdate : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . active && this . plugins [ this . _p ] . hasPreUpdate && this . plugins [ this . _p ] . preUpdate ( ) } , update : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . active && this . plugins [ this . _p ] . hasUpdate && this . plugins [ this . _p ] . update ( ) } , postUpdate : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . active && this . plugins [ this . _p ] . hasPostUpdate && this . plugins [ this . _p ] . postUpdate ( ) } , render : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . visible && this . plugins [ this . _p ] . hasRender && this . plugins [ this . _p ] . render ( ) } , postRender : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . visible && this . plugins [ this . _p ] . hasPostRender && this . plugins [ this . _p ] . postRender ( ) } , destroy : function ( ) { this . plugins . length = 0 , this . _pluginsLength = 0 , this . game = null , this . _parent = null } } , b . PluginManager . prototype . constructor = b . PluginManager , b . Stage = function ( a , c , d ) { this . game = a , this . offset = new b . Point , PIXI . Stage . call ( this , 0 , ! 1 ) , this . name = "_stage_root" , this . interactive = ! 1 , this . disableVisibilityChange = ! 1 , this . checkOffsetInterval = 2500 , this . exists = ! 0 , this . currentRenderOrderID = 0 , this . _hiddenVar = "hidden" , this . _nextOffsetCheck = 0 , this . _backgroundColor = 0 , a . config ? this . parseConfig ( a . config ) : ( this . game . canvas = b . Canvas . create ( c , d ) , this . game . canvas . style [ "-webkit-full-screen" ] = "width: 100%; height: 100%" ) } , b . Stage . prototype = Object . create ( PIXI . Stage . prototype ) , b . Stage . prototype . constructor = b . Stage , b . Stage . prototype . preUpdate = function ( ) { this . currentRenderOrderID = 0 ; for ( var a = this . children . length , b = 0 ; a > b ; b ++ ) this . children [ b ] . preUpdate ( ) } , b . Stage . prototype . update = function ( ) { for ( var a = this . children . length ; a -- ; ) this . children [ a ] . update ( ) } , b . Stage . prototype . postUpdate = function ( ) { if ( this . game . world . camera . target ) { this . game . world . camera . target . postUpdate ( ) , this . game . world . camera . update ( ) ; for ( var a = this . children . length ; a -- ; ) this . children [ a ] !== this . game . world . camera . target &&
console . log . apply ( console , f ) } else console . log ( "Phaser v" + a + " - Renderer: " + c + " - Audio: " + d + " - http://phaser.io" ) } , setUpRenderer : function ( ) { if ( this . device . trident && ( this . renderType = b . CANVAS ) , this . renderType === b . HEADLESS || this . renderType === b . CANVAS || this . renderType === b . AUTO && this . device . webGL === ! 1 ) { if ( ! this . device . canvas ) throw new Error ( "Phaser.Game - cannot create Canvas or WebGL context, aborting." ) ; this . renderType === b . AUTO && ( this . renderType = b . CANVAS ) , this . renderer = new PIXI . CanvasRenderer ( this . width , this . height , this . canvas , this . transparent ) , this . context = this . renderer . context } else this . renderType = b . WEBGL , this . renderer = new PIXI . WebGLRenderer ( this . width , this . height , this . canvas , this . transparent , this . antialias ) , this . context = null ; this . renderType !== b . HEADLESS && ( this . stage . smoothed = this . antialias , b . Canvas . addToDOM ( this . canvas , this . parent , ! 0 ) , b . Canvas . setTouchAction ( this . canvas ) ) } , update : function ( a ) { this . time . update ( a ) , this . _paused || this . pendingStep ? this . debug . preUpdate ( ) : ( this . stepping && ( this . pendingStep = ! 0 ) , this . debug . preUpdate ( ) , this . physics . preUpdate ( ) , this . state . preUpdate ( ) , this . plugins . preUpdate ( ) , this . stage . preUpdate ( ) , this . state . update ( ) , this . stage . update ( ) , this . tweens . update ( ) , this . sound . update ( ) , this . input . update ( ) , this . physics . update ( ) , this . particles . update ( ) , this . plugins . update ( ) , this . stage . postUpdate ( ) , this . plugins . postUpdate ( ) ) , this . renderType != b . HEADLESS && ( this . renderer . render ( this . stage ) , this . plugins . render ( ) , this . state . render ( ) , this . plugins . postRender ( ) ) } , enableStep : function ( ) { this . stepping = ! 0 , this . pendingStep = ! 1 , this . stepCount = 0 } , disableStep : function ( ) { this . stepping = ! 1 , this . pendingStep = ! 1 } , step : function ( ) { this . pendingStep = ! 1 , this . stepCount ++ } , destroy : function ( ) { this . raf . stop ( ) , this . input . destroy ( ) , this . state . destroy ( ) , this . physics . destroy ( ) , this . state = null , this . cache = null , this . input = null , this . load = null , this . sound = null , this . stage = null , this . time = null , this . world = null , this . isBooted = ! 1 } , gamePaused : function ( a ) { this . _paused || ( this . _paused = ! 0 , this . time . gamePaused ( ) , this . sound . setMute ( ) , this . onPause . dispatch ( a ) ) } , gameResumed : function ( a ) { this . _paused && ! this . _codePaused && ( this . _paused = ! 1 , this . time . gameResumed ( ) , this . input . reset ( ) , this . sound . unsetMute ( ) , this . onResume . dispatch ( a ) ) } , focusLoss : function ( a ) { this . onBlur . dispatch ( a ) , this . gamePaused ( a ) } , focusGain : function ( a ) { this . onFocus . dispatch ( a ) , this . gameResumed ( a ) } } , b . Game . prototype . constructor = b . Game , Object . defineProperty ( b . Game . prototype , "paused" , { get : function ( ) { return this . _paused } , set : function ( a ) { a === ! 0 ? this . _paused === ! 1 && ( this . _paused = ! 0 , this . _codePaused = ! 0 , this . sound . mute = ! 0 , this . time . gamePaused ( ) , this . onPause . dispatch ( this ) ) : this . _paused && ( this . _paused = ! 1 , this . _codePaused = ! 1 , this . input . reset ( ) , this . sound . mute = ! 1 , this . time . gameResumed ( ) , this . onResume . dispatch ( this ) ) } } ) , b . Input = function ( a ) { this . game = a , this . hitCanvas = null , this . hitContext = null , this . moveCallback = null , this . moveCallbackContext = this , this . pollRate = 0 , this . disabled = ! 1 , this . multiInputOverride = b . Input . MOUSE _TOUCH _COMBINE , this . position = null , this . speed = null , this . circle = null , this . scale = null , this . maxPointers = 10 , this . currentPointers = 0 , this . tapRate = 200 , this . doubleTapRate = 300 , this . holdRate = 2e3 , this . justPressedRate = 200 , this . justReleasedRate = 200 , this . recordPointerHistory = ! 1 , this . recordRate = 100 , this . recordLimit = 100 , this . pointer1 = null , this . pointer2 = null , this . pointer3 = null , this . pointer4 = null , this . pointer5 = null , this . pointer6 = null , this . pointer7 = null , this . pointer8 = null , this . pointer9 = null , this . pointer10 = null , this . activePointer = null , this . mousePointer = null , this . mouse = null , this . keyboard = null , this . touch = null , this . mspointer = null , this . gamepad = null , this . onDown = null , this . onUp = null , this . onTap = null , this . onHold = null , this . interactiveItems = new b . LinkedList , this . _localPoint = new b . Point , this . _pollCounter = 0 , this . _oldPosition = null , this . _x = 0 , this . _y = 0 } , b . Input . MOUSE _OVERRIDES _TOUCH = 0 , b . Input . TOUCH _OVERRIDES _MOUSE = 1 , b . Input . MOUSE _TOUCH _COMBINE = 2 , b . Input . prototype = { boot : function ( ) { this . mousePointer = new b . Pointer ( this . game , 0 ) , this . pointer1 = new b . Pointer ( this . game , 1 ) , this . pointer2 = new b . Pointer ( this . game , 2 ) , this . mouse = new b . Mouse ( this . game ) , this . keyb
} , b . Gamepad . prototype = { addCallbacks : function ( a , b ) { "undefined" != typeof b && ( this . onConnectCallback = "function" == typeof b . onConnect ? b . onConnect : this . onConnectCallback , this . onDisconnectCallback = "function" == typeof b . onDisconnect ? b . onDisconnect : this . onDisconnectCallback , this . onDownCallback = "function" == typeof b . onDown ? b . onDown : this . onDownCallback , this . onUpCallback = "function" == typeof b . onUp ? b . onUp : this . onUpCallback , this . onAxisCallback = "function" == typeof b . onAxis ? b . onAxis : this . onAxisCallback , this . onFloatCallback = "function" == typeof b . onFloat ? b . onFloat : this . onFloatCallback ) } , start : function ( ) { if ( ! this . _active ) { this . _active = ! 0 ; var a = this ; this . _ongamepadconnected = function ( b ) { var c = b . gamepad ; a . _rawPads . push ( c ) , a . _gamepads [ c . index ] . connect ( c ) } , window . addEventListener ( "gamepadconnected" , this . _ongamepadconnected , ! 1 ) , this . _ongamepaddisconnected = function ( b ) { var c = b . gamepad ; for ( var d in a . _rawPads ) a . _rawPads [ d ] . index === c . index && a . _rawPads . splice ( d , 1 ) ; a . _gamepads [ c . index ] . disconnect ( ) } , window . addEventListener ( "gamepaddisconnected" , this . _ongamepaddisconnected , ! 1 ) } } , update : function ( ) { this . _pollGamepads ( ) ; for ( var a = 0 ; a < this . _gamepads . length ; a ++ ) this . _gamepads [ a ] . _connected && this . _gamepads [ a ] . pollStatus ( ) } , _pollGamepads : function ( ) { var a = navigator . getGamepads || navigator . webkitGetGamepads && navigator . webkitGetGamepads ( ) || navigator . webkitGamepads ; if ( a ) { this . _rawPads = [ ] ; for ( var b = ! 1 , c = 0 ; c < a . length && ( typeof a [ c ] !== this . _prevRawGamepadTypes [ c ] && ( b = ! 0 , this . _prevRawGamepadTypes [ c ] = typeof a [ c ] ) , a [ c ] && this . _rawPads . push ( a [ c ] ) , 3 !== c ) ; c ++ ) ; if ( b ) { for ( var d , e = { rawIndices : { } , padIndices : { } } , f = 0 ; f < this . _gamepads . length ; f ++ ) if ( d = this . _gamepads [ f ] , d . connected ) for ( var g = 0 ; g < this . _rawPads . length ; g ++ ) this . _rawPads [ g ] . index === d . index && ( e . rawIndices [ d . index ] = ! 0 , e . padIndices [ f ] = ! 0 ) ; for ( var h = 0 ; h < this . _gamepads . length ; h ++ ) if ( d = this . _gamepads [ h ] , ! e . padIndices [ h ] ) { this . _rawPads . length < 1 && d . disconnect ( ) ; for ( var i = 0 ; i < this . _rawPads . length && ! e . padIndices [ h ] ; i ++ ) { var j = this . _rawPads [ i ] ; if ( j ) { if ( e . rawIndices [ j . index ] ) { d . disconnect ( ) ; continue } d . connect ( j ) , e . rawIndices [ j . index ] = ! 0 , e . padIndices [ h ] = ! 0 } else d . disconnect ( ) } } } } } , setDeadZones : function ( a ) { for ( var b = 0 ; b < this . _gamepads . length ; b ++ ) this . _gamepads [ b ] . deadZone = a } , stop : function ( ) { this . _active = ! 1 , window . removeEventListener ( "gamepadconnected" , this . _ongamepadconnected ) , window . removeEventListener ( "gamepaddisconnected" , this . _ongamepaddisconnected ) } , reset : function ( ) { this . update ( ) ; for ( var a = 0 ; a < this . _gamepads . length ; a ++ ) this . _gamepads [ a ] . reset ( ) } , justPressed : function ( a , b ) { for ( var c = 0 ; c < this . _gamepads . length ; c ++ ) if ( this . _gamepads [ c ] . justPressed ( a , b ) === ! 0 ) return ! 0 ; return ! 1 } , justReleased : function ( a , b ) { for ( var c = 0 ; c < this . _gamepads . length ; c ++ ) if ( this . _gamepads [ c ] . justReleased ( a , b ) === ! 0 ) return ! 0 ; return ! 1 } , isDown : function ( a ) { for ( var b = 0 ; b < this . _gamepads . length ; b ++ ) if ( this . _gamepads [ b ] . isDown ( a ) === ! 0 ) return ! 0 ; return ! 1 } } , b . Gamepad . prototype . constructor = b . Gamepad , Object . defineProperty ( b . Gamepad . prototype , "active" , { get : function ( ) { return this . _active } } ) , Object . defineProperty ( b . Gamepad . prototype , "supported" , { get : function ( ) { return this . _gamepadSupportAvailable } } ) , Object . defineProperty ( b . Gamepad . prototype , "padsConnected" , { get : function ( ) { return this . _rawPads . length } } ) , Object . defineProperty ( b . Gamepad . prototype , "pad1" , { get : function ( ) { return this . _gamepads [ 0 ] } } ) , Object . defineProperty ( b . Gamepad . prototype , "pad2" , { get : function ( ) { return this . _gamepads [ 1 ] } } ) , Object . defineProperty ( b . Gamepad . prototype , "pad3" , { get : function ( ) { return this . _gamepads [ 2 ] } } ) , Object . defineProperty ( b . Gamepad . prototype , "pad4" , { get : function ( ) { return this . _gamepads [ 3 ] } } ) , b . Gamepad . BUTTON _0 = 0 , b . Gamepad . BUTTON _1 = 1 , b . Gamepad . BUTTON _2 = 2 , b . Gamepad . BUTTON _3 = 3 , b . Gamepad . BUTTON _4 = 4 , b . Gamepad . BUTTON _5 = 5 , b . Gamepad . BUTTON _6 = 6 , b . Gamepad . BUTTON _7 = 7 , b . Gamepad . BUTTON _8 = 8 , b . Gamepad . BUTTON _9 = 9 , b . Gamepad . BUTTON _10 = 10 , b . Gamepad . BUTTON _11 = 11 , b . Gamepad . BUTTON _12 = 12 , b . Gamepad . BUTTON _13 = 13 , b . Gamepad . BUTTON _14 = 14 , b . Gamepad . BUTTON _15 = 15 , b . Gamepad . AXIS _0 = 0 , b . Gamepad . AXIS _1 = 1 , b . Gamepad . AXIS _2 = 2 , b . Gamepad . AXIS _3 = 3 , b . Gamepad . AXIS _4 = 4 , b . Gamepad . AXIS _5 = 5 , b . Gamepad . AXIS _6 = 6 , b . Gamepad . AXIS _7 = 7 , b . Gamepad . AXIS _8 = 8 , b . Gamepad
} , b . Sprite . prototype = Object . create ( PIXI . Sprite . prototype ) , b . Sprite . prototype . constructor = b . Sprite , b . Sprite . prototype . preUpdate = function ( ) { if ( 1 === this . _cache [ 4 ] && this . exists ) return this . world . setTo ( this . parent . position . x + this . position . x , this . parent . position . y + this . position . y ) , this . worldTransform . tx = this . world . x , this . worldTransform . ty = this . world . y , this . _cache [ 0 ] = this . world . x , this . _cache [ 1 ] = this . world . y , this . _cache [ 2 ] = this . rotation , this . body && this . body . preUpdate ( ) , this . _cache [ 4 ] = 0 , ! 1 ; if ( this . _cache [ 0 ] = this . world . x , this . _cache [ 1 ] = this . world . y , this . _cache [ 2 ] = this . rotation , ! this . exists || ! this . parent . exists ) return this . _cache [ 3 ] = - 1 , ! 1 ; if ( this . lifespan > 0 && ( this . lifespan -= this . game . time . elapsed , this . lifespan <= 0 ) ) return this . kill ( ) , ! 1 ; if ( ( this . autoCull || this . checkWorldBounds ) && this . _bounds . copyFrom ( this . getBounds ( ) ) , this . autoCull && ( this . renderable = this . game . world . camera . screenView . intersects ( this . _bounds ) ) , this . checkWorldBounds ) if ( 1 === this . _cache [ 5 ] && this . game . world . bounds . intersects ( this . _bounds ) ) this . _cache [ 5 ] = 0 , this . events . onEnterBounds . dispatch ( this ) ; else if ( 0 === this . _cache [ 5 ] && ! this . game . world . bounds . intersects ( this . _bounds ) && ( this . _cache [ 5 ] = 1 , this . events . onOutOfBounds . dispatch ( this ) , this . outOfBoundsKill ) ) return this . kill ( ) , ! 1 ; this . world . setTo ( this . game . camera . x + this . worldTransform . tx , this . game . camera . y + this . worldTransform . ty ) , this . visible && ( this . _cache [ 3 ] = this . game . stage . currentRenderOrderID ++ ) , this . animations . update ( ) , this . body && this . body . preUpdate ( ) ; for ( var a = 0 , b = this . children . length ; b > a ; a ++ ) this . children [ a ] . preUpdate ( ) ; return ! 0 } , b . Sprite . prototype . update = function ( ) { } , b . Sprite . prototype . postUpdate = function ( ) { this . key instanceof b . BitmapData && this . key . render ( ) , this . exists && this . body && this . body . postUpdate ( ) , 1 === this . _cache [ 7 ] && ( this . position . x = ( this . game . camera . view . x + this . cameraOffset . x ) / this . game . camera . scale . x , this . position . y = ( this . game . camera . view . y + this . cameraOffset . y ) / this . game . camera . scale . y ) ; for ( var a = 0 , c = this . children . length ; c > a ; a ++ ) this . children [ a ] . postUpdate ( ) } , b . Sprite . prototype . loadTexture = function ( a , c ) { return c = c || 0 , a instanceof b . RenderTexture ? ( this . key = a . key , void this . setTexture ( a ) ) : a instanceof b . BitmapData ? ( this . key = a , void this . setTexture ( a . texture ) ) : a instanceof PIXI . Texture ? ( this . key = a , void this . setTexture ( a ) ) : null === a || "undefined" == typeof a ? ( this . key = "__default" , void this . setTexture ( PIXI . TextureCache [ this . key ] ) ) : "string" != typeof a || this . game . cache . checkImageKey ( a ) ? this . game . cache . isSpriteSheet ( a ) ? ( this . key = a , this . animations . loadFrameData ( this . game . cache . getFrameData ( a ) ) , "string" == typeof c ? this . frameName = c : this . frame = c , void 0 ) : ( this . key = a , void this . setTexture ( PIXI . TextureCache [ a ] ) ) : ( this . key = "__missing" , void this . setTexture ( PIXI . TextureCache [ this . key ] ) ) } , b . Sprite . prototype . crop = function ( a ) { if ( "undefined" == typeof a || null === a ) this . texture . hasOwnProperty ( "sourceWidth" ) && this . texture . setFrame ( new b . Rectangle ( 0 , 0 , this . texture . sourceWidth , this . texture . sourceHeight ) ) ; else if ( this . texture instanceof PIXI . Texture ) { var c = { } ; b . Utils . extend ( ! 0 , c , this . texture ) , c . sourceWidth = c . width , c . sourceHeight = c . height , c . frame = a , c . width = a . width , c . height = a . height , this . texture = c , this . texture . updateFrame = ! 0 , PIXI . Texture . frameUpdates . push ( this . texture ) } else this . texture . setFrame ( a ) } , b . Sprite . prototype . revive = function ( a ) { return "undefined" == typeof a && ( a = 1 ) , this . alive = ! 0 , this . exists = ! 0 , this . visible = ! 0 , this . health = a , this . events && this . events . onRevived . dispatch ( this ) , this } , b . Sprite . prototype . kill = function ( ) { return this . alive = ! 1 , this . exists = ! 1 , this . visible = ! 1 , this . events && this . events . onKilled . dispatch ( this ) , this } , b . Sprite . prototype . destroy = function ( a ) { if ( null !== this . game ) { "undefined" == typeof a && ( a = ! 0 ) , this . parent && ( this . parent instanceof b . Group ? this . parent . remove ( this ) : this . parent . removeChild ( this ) ) , this . input && this . input . destroy ( ) , this . animations && this . animations . destroy ( ) , this . body && this . body . destroy ( ) , this . events && this . events . destroy ( ) ; var c = this . children . length ; if ( a ) for ( ; c -- ; ) this . children [ c ] . destroy ( a ) ; else for ( ; c -- ; ) this . removeChild ( this . children [ c ] ) ; this . alive = ! 1 , this . exists = ! 1 , this . visible = ! 1 , this . filters = null , this . mask = null , this . ga
} , b . Button . prototype = Object . create ( b . Image . prototype ) , b . Button . prototype . constructor = b . Button , b . Button . prototype . clearFrames = function ( ) { this . _onOverFrameName = null , this . _onOverFrameID = null , this . _onOutFrameName = null , this . _onOutFrameID = null , this . _onDownFrameName = null , this . _onDownFrameID = null , this . _onUpFrameName = null , this . _onUpFrameID = null } , b . Button . prototype . setFrames = function ( a , b , c , d ) { this . clearFrames ( ) , null !== a && ( "string" == typeof a ? ( this . _onOverFrameName = a , this . input . pointerOver ( ) && ( this . frameName = a ) ) : ( this . _onOverFrameID = a , this . input . pointerOver ( ) && ( this . frame = a ) ) ) , null !== b && ( "string" == typeof b ? ( this . _onOutFrameName = b , this . input . pointerOver ( ) === ! 1 && ( this . frameName = b ) ) : ( this . _onOutFrameID = b , this . input . pointerOver ( ) === ! 1 && ( this . frame = b ) ) ) , null !== c && ( "string" == typeof c ? ( this . _onDownFrameName = c , this . input . pointerDown ( ) && ( this . frameName = c ) ) : ( this . _onDownFrameID = c , this . input . pointerDown ( ) && ( this . frame = c ) ) ) , null !== d && ( "string" == typeof d ? ( this . _onUpFrameName = d , this . input . pointerUp ( ) && ( this . frameName = d ) ) : ( this . _onUpFrameID = d , this . input . pointerUp ( ) && ( this . frame = d ) ) ) } , b . Button . prototype . setSounds = function ( a , b , c , d , e , f , g , h ) { this . setOverSound ( a , b ) , this . setOutSound ( e , f ) , this . setDownSound ( c , d ) , this . setUpSound ( g , h ) } , b . Button . prototype . setOverSound = function ( a , c ) { this . onOverSound = null , this . onOverSoundMarker = "" , a instanceof b . Sound && ( this . onOverSound = a ) , "string" == typeof c && ( this . onOverSoundMarker = c ) } , b . Button . prototype . setOutSound = function ( a , c ) { this . onOutSound = null , this . onOutSoundMarker = "" , a instanceof b . Sound && ( this . onOutSound = a ) , "string" == typeof c && ( this . onOutSoundMarker = c ) } , b . Button . prototype . setDownSound = function ( a , c ) { this . onDownSound = null , this . onDownSoundMarker = "" , a instanceof b . Sound && ( this . onDownSound = a ) , "string" == typeof c && ( this . onDownSoundMarker = c ) } , b . Button . prototype . setUpSound = function ( a , c ) { this . onUpSound = null , this . onUpSoundMarker = "" , a instanceof b . Sound && ( this . onUpSound = a ) , "string" == typeof c && ( this . onUpSoundMarker = c ) } , b . Button . prototype . onInputOverHandler = function ( a , b ) { this . freezeFrames === ! 1 && this . setState ( 1 ) , this . onOverSound && this . onOverSound . play ( this . onOverSoundMarker ) , this . onInputOver && this . onInputOver . dispatch ( this , b ) } , b . Button . prototype . onInputOutHandler = function ( a , b ) { this . freezeFrames === ! 1 && this . setState ( 2 ) , this . onOutSound && this . onOutSound . play ( this . onOutSoundMarker ) , this . onInputOut && this . onInputOut . dispatch ( this , b ) } , b . Button . prototype . onInputDownHandler = function ( a , b ) { this . freezeFrames === ! 1 && this . setState ( 3 ) , this . onDownSound && this . onDownSound . play ( this . onDownSoundMarker ) , this . onInputDown && this . onInputDown . dispatch ( this , b ) } , b . Button . prototype . onInputUpHandler = function ( a , b , c ) { this . onUpSound && this . onUpSound . play ( this . onUpSoundMarker ) , this . onInputUp && this . onInputUp . dispatch ( this , b , c ) , this . freezeFrames || this . setState ( this . forceOut ? 2 : null !== this . _onUpFrameName || null !== this . _onUpFrameID ? 4 : c ? 1 : 2 ) } , b . Button . prototype . setState = function ( a ) { 1 === a ? null != this . _onOverFrameName ? this . frameName = this . _onOverFrameName : null != this . _onOverFrameID && ( this . frame = this . _onOverFrameID ) : 2 === a ? null != this . _onOutFrameName ? this . frameName = this . _onOutFrameName : null != this . _onOutFrameID && ( this . frame = this . _onOutFrameID ) : 3 === a ? null != this . _onDownFrameName ? this . frameName = this . _onDownFrameName : null != this . _onDownFrameID && ( this . frame = this . _onDownFrameID ) : 4 === a && ( null != this . _onUpFrameName ? this . frameName = this . _onUpFrameName : null != this . _onUpFrameID && ( this . frame = this . _onUpFrameID ) ) } , b . Graphics = function ( a , c , d ) { c = c || 0 , d = d || 0 , this . game = a , this . exists = ! 0 , this . name = "" , this . type = b . GRAPHICS , this . z = 0 , this . world = new b . Point ( c , d ) , this . cameraOffset = new b . Point , PIXI . Graphics . call ( this ) , this . position . set ( c , d ) , this . _cache = [ 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 ] } , b . Graphics . prototype = Object . create ( PIXI . Graphics . prototype ) , b . Graphics . prototype . constructor = b . Graphics , b . Graphics . prototype . preUpdate = function ( ) { return this . _cache [ 0 ] = this . world . x , this . _cache [ 1 ] = this . world . y , this . _cache [ 2 ] = this . rotation , this . exists && this . parent . exists ? ( this . autoCull && ( this . renderable = this . game . world . camera . screenView . intersects ( this . getBounds ( ) ) ) , this . world . setTo ( this . game . camera . x + this . worldTransform [ 2 ] , this . game . camera . y + this . w
if ( f . test ( d ) ) e = "undefined" != typeof b && null !== b ? d . replace ( f , "$1" + a + "=" + b + "$2$3" ) : d . replace ( f , "$1$3" ) . replace ( /(&|\?)$/ , "" ) ; else if ( "undefined" != typeof b && null !== b ) { var g = - 1 !== d . indexOf ( "?" ) ? "&" : "?" , h = d . split ( "#" ) ; d = h [ 0 ] + g + a + "=" + b , h [ 1 ] && ( d += "#" + h [ 1 ] ) , e = d } else e = d ; return c ? void ( window . location . href = e ) : e } , getQueryString : function ( a ) { "undefined" == typeof a && ( a = "" ) ; var b = { } , c = location . search . substring ( 1 ) . split ( "&" ) ; for ( var d in c ) { var e = c [ d ] . split ( "=" ) ; if ( e . length > 1 ) { if ( a && a == this . decodeURI ( e [ 0 ] ) ) return this . decodeURI ( e [ 1 ] ) ; b [ this . decodeURI ( e [ 0 ] ) ] = this . decodeURI ( e [ 1 ] ) } } return b } , decodeURI : function ( a ) { return decodeURIComponent ( a . replace ( /\+/g , " " ) ) } } , b . Net . prototype . constructor = b . Net , b . TweenManager = function ( a ) { this . game = a , this . _tweens = [ ] , this . _add = [ ] , this . game . onPause . add ( this . _pauseAll , this ) , this . game . onResume . add ( this . _resumeAll , this ) } , b . TweenManager . prototype = { getAll : function ( ) { return this . _tweens } , removeAll : function ( ) { for ( var a = 0 ; a < this . _tweens . length ; a ++ ) this . _tweens [ a ] . pendingDelete = ! 0 ; this . _add = [ ] } , add : function ( a ) { a . _manager = this , this . _add . push ( a ) } , create : function ( a ) { return new b . Tween ( a , this . game , this ) } , remove : function ( a ) { var b = this . _tweens . indexOf ( a ) ; - 1 !== b && ( this . _tweens [ b ] . pendingDelete = ! 0 ) } , update : function ( ) { if ( 0 === this . _tweens . length && 0 === this . _add . length ) return ! 1 ; for ( var a = 0 , b = this . _tweens . length ; b > a ; ) this . _tweens [ a ] . update ( this . game . time . now ) ? a ++ : ( this . _tweens . splice ( a , 1 ) , b -- ) ; return this . _add . length > 0 && ( this . _tweens = this . _tweens . concat ( this . _add ) , this . _add . length = 0 ) , ! 0 } , isTweening : function ( a ) { return this . _tweens . some ( function ( b ) { return b . _object === a } ) } , _pauseAll : function ( ) { for ( var a = this . _tweens . length - 1 ; a >= 0 ; a -- ) this . _tweens [ a ] . _pause ( ) } , _resumeAll : function ( ) { for ( var a = this . _tweens . length - 1 ; a >= 0 ; a -- ) this . _tweens [ a ] . _resume ( ) } , pauseAll : function ( ) { for ( var a = this . _tweens . length - 1 ; a >= 0 ; a -- ) this . _tweens [ a ] . pause ( ) } , resumeAll : function ( ) { for ( var a = this . _tweens . length - 1 ; a >= 0 ; a -- ) this . _tweens [ a ] . resume ( ! 0 ) } } , b . TweenManager . prototype . constructor = b . TweenManager , b . Tween = function ( a , c , d ) { this . _object = a , this . game = c , this . _manager = d , this . _valuesStart = { } , this . _valuesEnd = { } , this . _valuesStartRepeat = { } , this . _duration = 1e3 , this . _repeat = 0 , this . _yoyo = ! 1 , this . _reversed = ! 1 , this . _delayTime = 0 , this . _startTime = null , this . _easingFunction = b . Easing . Linear . None , this . _interpolationFunction = b . Math . linearInterpolation , this . _chainedTweens = [ ] , this . _onStartCallbackFired = ! 1 , this . _onUpdateCallback = null , this . _onUpdateCallbackContext = null , this . _paused = ! 1 , this . _pausedTime = 0 , this . _codePaused = ! 1 , this . pendingDelete = ! 1 , this . onStart = new b . Signal , this . onLoop = new b . Signal , this . onComplete = new b . Signal , this . isRunning = ! 1 } , b . Tween . prototype = { to : function ( a , b , c , d , e , f , g ) { b = b || 1e3 , c = c || null , d = d || ! 1 , e = e || 0 , f = f || 0 , g = g || ! 1 ; var h ; return this . _parent ? ( h = this . _manager . create ( this . _object ) , this . _lastChild . chain ( h ) , this . _lastChild = h ) : ( h = this , this . _parent = this , this . _lastChild = this ) , h . _repeat = f , h . _duration = b , h . _valuesEnd = a , null !== c && ( h . _easingFunction = c ) , e > 0 && ( h . _delayTime = e ) , h . _yoyo = g , d ? this . start ( ) : this } , start : function ( ) { if ( null !== this . game && null !== this . _object ) { this . _manager . add ( this ) , this . isRunning = ! 0 , this . _onStartCallbackFired = ! 1 , this . _startTime = this . game . time . now + this . _delayTime ; for ( var a in this . _valuesEnd ) { if ( Array . isArray ( this . _valuesEnd [ a ] ) ) { if ( 0 === this . _valuesEnd [ a ] . length ) continue ; this . _valuesEnd [ a ] = [ this . _object [ a ] ] . concat ( this . _valuesEnd [ a ] ) } this . _valuesStart [ a ] = this . _object [ a ] , Array . isArray ( this . _valuesStart [ a ] ) || ( this . _valuesStart [ a ] *= 1 ) , this . _valuesStartRepeat [ a ] = this . _valuesStart [ a ] || 0 } return this } } , generateData : function ( a , b ) { if ( null === this . game || null === this . _object ) return null ; this . _startTime = 0 ; for ( var c in this . _valuesEnd ) { if ( Array . isArray ( this . _valuesEnd [ c ] ) ) { if ( 0 === this . _valuesEnd [ c ] . length ) continue ; this . _valuesEnd [ c ] = [ this . _object [ c ] ] . concat ( this . _valuesEnd [ c ] ) } this . _valuesStart [ c ] = this . _object [ c ] , Array . isArray ( this . _valuesStart [ c ] ) || ( this . _valuesStart [ c ] *= 1 ) , this . _valuesStartRepeat [ c ] = this . _valuesStart [ c ] || 0 } for ( var d = 0 , e = Math . floor ( a * ( this . _duration / 1e3 ) ) , f = this . _duration / e , g = [ ] ; e -- ; ) { var c , h = ( d - this . _startTime ) / this . _duration ; h = h > 1 ? 1 : h ; var i = this . _easingFun
} , addMissingImage : function ( ) { var a = new Image ; a . src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==" , this . _images . _ _missing = { url : null , data : a , spriteSheet : ! 1 } , this . _images . _ _missing . frame = new b . Frame ( 0 , 0 , 0 , 32 , 32 , "" , "" ) , PIXI . BaseTextureCache . _ _missing = new PIXI . BaseTexture ( a ) , PIXI . TextureCache . _ _missing = new PIXI . Texture ( PIXI . BaseTextureCache . _ _missing ) } , addText : function ( a , b , c ) { this . _text [ a ] = { url : b , data : c } } , addJSON : function ( a , b , c ) { this . _json [ a ] = { url : b , data : c } } , addImage : function ( a , c , d ) { this . _images [ a ] = { url : c , data : d , spriteSheet : ! 1 } , this . _images [ a ] . frame = new b . Frame ( 0 , 0 , 0 , d . width , d . height , a , this . game . rnd . uuid ( ) ) , PIXI . BaseTextureCache [ a ] = new PIXI . BaseTexture ( d ) , PIXI . TextureCache [ a ] = new PIXI . Texture ( PIXI . BaseTextureCache [ a ] ) } , addSound : function ( a , b , c , d , e ) { d = d || ! 0 , e = e || ! 1 ; var f = ! 1 ; e && ( f = ! 0 ) , this . _sounds [ a ] = { url : b , data : c , isDecoding : ! 1 , decoded : f , webAudio : d , audioTag : e , locked : this . game . sound . touchLocked } } , reloadSound : function ( a ) { var b = this ; this . _sounds [ a ] && ( this . _sounds [ a ] . data . src = this . _sounds [ a ] . url , this . _sounds [ a ] . data . addEventListener ( "canplaythrough" , function ( ) { return b . reloadSoundComplete ( a ) } , ! 1 ) , this . _sounds [ a ] . data . load ( ) ) } , reloadSoundComplete : function ( a ) { this . _sounds [ a ] && ( this . _sounds [ a ] . locked = ! 1 , this . onSoundUnlock . dispatch ( a ) ) } , updateSound : function ( a , b , c ) { this . _sounds [ a ] && ( this . _sounds [ a ] [ b ] = c ) } , decodedSound : function ( a , b ) { this . _sounds [ a ] . data = b , this . _sounds [ a ] . decoded = ! 0 , this . _sounds [ a ] . isDecoding = ! 1 } , getCanvas : function ( a ) { return this . _canvases [ a ] ? this . _canvases [ a ] . canvas : void console . warn ( 'Phaser.Cache.getCanvas: Invalid key: "' + a + '"' ) } , getBitmapData : function ( a ) { return this . _bitmapDatas [ a ] ? this . _bitmapDatas [ a ] : void console . warn ( 'Phaser.Cache.getBitmapData: Invalid key: "' + a + '"' ) } , getBitmapFont : function ( a ) { return this . _bitmapFont [ a ] ? this . _bitmapFont [ a ] : void console . warn ( 'Phaser.Cache.getBitmapFont: Invalid key: "' + a + '"' ) } , getPhysicsData : function ( a , b , c ) { if ( "undefined" == typeof b || null === b ) { if ( this . _physics [ a ] ) return this . _physics [ a ] . data ; console . warn ( 'Phaser.Cache.getPhysicsData: Invalid key: "' + a + '"' ) } else if ( this . _physics [ a ] && this . _physics [ a ] . data [ b ] ) { var d = this . _physics [ a ] . data [ b ] ; if ( ! d || ! c ) return d ; for ( var e in d ) if ( e = d [ e ] , e . fixtureKey === c ) return e ; console . warn ( 'Phaser.Cache.getPhysicsData: Could not find given fixtureKey: "' + c + " in " + a + '"' ) } else console . warn ( 'Phaser.Cache.getPhysicsData: Invalid key/object: "' + a + " / " + b + '"' ) ; return null } , checkImageKey : function ( a ) { return this . _images [ a ] ? ! 0 : ! 1 } , getImage : function ( a ) { return this . _images [ a ] ? this . _images [ a ] . data : void console . warn ( 'Phaser.Cache.getImage: Invalid key: "' + a + '"' ) } , getTilemapData : function ( a ) { return this . _tilemaps [ a ] ? this . _tilemaps [ a ] : void console . warn ( 'Phaser.Cache.getTilemapData: Invalid key: "' + a + '"' ) } , getFrameData : function ( a ) { return this . _images [ a ] && this . _images [ a ] . frameData ? this . _images [ a ] . frameData : null } , updateFrameData : function ( a , b ) { this . _images [ a ] && ( this . _images [ a ] . spriteSheet = ! 0 , this . _images [ a ] . frameData = b ) } , getFrameByIndex : function ( a , b ) { return this . _images [ a ] && this . _images [ a ] . frameData ? this . _images [ a ] . frameData . getFrame ( b ) : null } , getFrameByName : function ( a , b ) { return this . _images [ a ] && this . _images [ a ] . frameData ? this . _images [ a ] . frameData . getFrameByName ( b ) : null } , getFrame : function ( a ) { return this . _images [ a ] && this . _images [ a ] . spriteSheet === ! 1 ? this . _images [ a ] . frame : null } , getTextureFrame : function ( a ) { return this . _textures [ a ] ? this . _textures [ a ] . frame : null } , getTexture : function ( a ) { return this . _textures [ a ] ? this . _textures [ a ] : void console . warn ( 'Phaser.Cache.getTexture: Invalid key: "' + a + '"' ) } , getSound : function ( a ) { return this . _sounds [ a ] ? this . _sounds [ a ] : void console . warn ( 'Phaser.Cache.getSound: Invalid key: "' + a + '"' ) } , getSoundData : function ( a ) { return this . _sounds [ a ] ? this . _sounds [ a ] . data : void console . warn ( 'Phaser.Cache.getSoundData: Invalid key: "' + a + '"' ) } , isSoundDecoded : f
for ( var a = 0 ; a < this . _sounds . length ; a ++ ) this . _sounds [ a ] . update ( ) } , add : function ( a , c , d , e ) { "undefined" == typeof c && ( c = 1 ) , "undefined" == typeof d && ( d = ! 1 ) , "undefined" == typeof e && ( e = this . connectToMaster ) ; var f = new b . Sound ( this . game , a , c , d , e ) ; return this . _sounds . push ( f ) , f } , play : function ( a , b , c ) { var d = this . add ( a , b , c ) ; return d . play ( ) , d } , setMute : function ( ) { if ( ! this . _muted ) { this . _muted = ! 0 , this . usingWebAudio && ( this . _muteVolume = this . masterGain . gain . value , this . masterGain . gain . value = 0 ) ; for ( var a = 0 ; a < this . _sounds . length ; a ++ ) this . _sounds [ a ] . usingAudioTag && ( this . _sounds [ a ] . mute = ! 0 ) } } , unsetMute : function ( ) { if ( this . _muted && ! this . _codeMuted ) { this . _muted = ! 1 , this . usingWebAudio && ( this . masterGain . gain . value = this . _muteVolume ) ; for ( var a = 0 ; a < this . _sounds . length ; a ++ ) this . _sounds [ a ] . usingAudioTag && ( this . _sounds [ a ] . mute = ! 1 ) } } } , b . SoundManager . prototype . constructor = b . SoundManager , Object . defineProperty ( b . SoundManager . prototype , "mute" , { get : function ( ) { return this . _muted } , set : function ( a ) { if ( a = a || null ) { if ( this . _muted ) return ; this . _codeMuted = ! 0 , this . setMute ( ) } else { if ( this . _muted === ! 1 ) return ; this . _codeMuted = ! 1 , this . unsetMute ( ) } } } ) , Object . defineProperty ( b . SoundManager . prototype , "volume" , { get : function ( ) { return this . usingWebAudio ? this . masterGain . gain . value : this . _volume } , set : function ( a ) { if ( this . _volume = a , this . usingWebAudio ) this . masterGain . gain . value = a ; else for ( var b = 0 ; b < this . _sounds . length ; b ++ ) this . _sounds [ b ] . usingAudioTag && ( this . _sounds [ b ] . volume = this . _sounds [ b ] . volume * a ) } } ) , b . Utils . Debug = function ( a ) { this . game = a , this . sprite = null , this . canvas = null , this . baseTexture = null , this . texture = null , this . textureFrame = null , this . context = null , this . font = "14px Courier" , this . columnWidth = 100 , this . lineHeight = 16 , this . renderShadow = ! 0 , this . currentX = 0 , this . currentY = 0 , this . currentAlpha = 1 , this . dirty = ! 1 } , b . Utils . Debug . prototype = { boot : function ( ) { this . game . renderType === b . CANVAS ? this . context = this . game . context : ( this . canvas = b . Canvas . create ( this . game . width , this . game . height , "" , ! 0 ) , this . context = this . canvas . getContext ( "2d" ) , this . baseTexture = new PIXI . BaseTexture ( this . canvas ) , this . texture = new PIXI . Texture ( this . baseTexture ) , this . textureFrame = new b . Frame ( 0 , 0 , 0 , this . game . width , this . game . height , "debug" , this . game . rnd . uuid ( ) ) , this . sprite = this . game . make . image ( 0 , 0 , this . texture , this . textureFrame ) , this . game . stage . addChild ( this . sprite ) ) } , preUpdate : function ( ) { this . dirty && this . sprite && ( this . context . clearRect ( 0 , 0 , this . game . width , this . game . height ) , this . dirty = ! 1 ) } , start : function ( a , b , c , d ) { "number" != typeof a && ( a = 0 ) , "number" != typeof b && ( b = 0 ) , c = c || "rgb(255,255,255)" , "undefined" == typeof d && ( d = 0 ) , this . currentX = a , this . currentY = b , this . currentColor = c , this . currentAlpha = this . context . globalAlpha , this . columnWidth = d , this . sprite && ( this . dirty = ! 0 ) , this . context . save ( ) , this . context . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) , this . context . strokeStyle = c , this . context . fillStyle = c , this . context . font = this . font , this . context . globalAlpha = 1 } , stop : function ( ) { this . context . restore ( ) , this . context . globalAlpha = this . currentAlpha , this . sprite && PIXI . updateWebGLTexture ( this . baseTexture , this . game . renderer . gl ) } , line : function ( ) { for ( var a = this . currentX , b = 0 ; b < arguments . length ; b ++ ) this . renderShadow && ( this . context . fillStyle = "rgb(0,0,0)" , this . context . fillText ( arguments [ b ] , a + 1 , this . currentY + 1 ) , this . context . fillStyle = this . currentColor ) , this . context . fillText ( arguments [ b ] , a , this . currentY ) , a += this . columnWidth ; this . currentY += this . lineHeight } , soundInfo : function ( a , b , c , d ) { this . start ( b , c , d ) , this . line ( "Sound: " + a . key + " Locked: " + a . game . sound . touchLocked ) , this . line ( "Is Ready?: " + this . game . cache . isSoundReady ( a . key ) + " Pending Playback: " + a . pendingPlayback ) , this . line ( "Decoded: " + a . isDecoded + " Decoding: " + a . isDecoding ) , this . line ( "Total Duration: " + a . totalDuration + " Playing: " + a . isPlaying ) , this . line ( "Time: " + a . currentTime ) , this . line ( "Volume: " + a . volume + " Muted: " + a . mute ) , this . line ( "WebAudio: " + a . usingWebAudio + " Audio: " + a . usingAudioTag ) , "" !== a . currentMarker && ( this . line ( "Marker: " + a . currentMarker + " Duration: " + a . duration ) , this . line ( "Start: " + a . markers [ a . currentMarker ] . start + " Stop: " + a . markers [ a . currentMarker ] . stop ) , this . line ( "Position: " + a . position ) ) , this . stop ( ) } , cameraInfo : function ( a , b , c , d ) { this . start ( b , c , d )
} , destroy : function ( ) { this . sprite = null } , checkWorldBounds : function ( ) { this . position . x < this . game . physics . arcade . bounds . x && this . game . physics . arcade . checkCollision . left ? ( this . position . x = this . game . physics . arcade . bounds . x , this . velocity . x *= - this . bounce . x , this . blocked . left = ! 0 ) : this . right > this . game . physics . arcade . bounds . right && this . game . physics . arcade . checkCollision . right && ( this . position . x = this . game . physics . arcade . bounds . right - this . width , this . velocity . x *= - this . bounce . x , this . blocked . right = ! 0 ) , this . position . y < this . game . physics . arcade . bounds . y && this . game . physics . arcade . checkCollision . up ? ( this . position . y = this . game . physics . arcade . bounds . y , this . velocity . y *= - this . bounce . y , this . blocked . up = ! 0 ) : this . bottom > this . game . physics . arcade . bounds . bottom && this . game . physics . arcade . checkCollision . down && ( this . position . y = this . game . physics . arcade . bounds . bottom - this . height , this . velocity . y *= - this . bounce . y , this . blocked . down = ! 0 ) } , setSize : function ( a , b , c , d ) { c = c || this . offset . x , d = d || this . offset . y , this . sourceWidth = a , this . sourceHeight = b , this . width = this . sourceWidth * this . _sx , this . height = this . sourceHeight * this . _sy , this . halfWidth = Math . floor ( this . width / 2 ) , this . halfHeight = Math . floor ( this . height / 2 ) , this . offset . setTo ( c , d ) , this . center . setTo ( this . position . x + this . halfWidth , this . position . y + this . halfHeight ) } , reset : function ( a , b ) { this . velocity . set ( 0 ) , this . acceleration . set ( 0 ) , this . angularVelocity = 0 , this . angularAcceleration = 0 , this . position . x = a - this . sprite . anchor . x * this . width + this . offset . x , this . position . y = b - this . sprite . anchor . y * this . height + this . offset . y , this . prev . x = this . position . x , this . prev . y = this . position . y , this . rotation = this . sprite . angle , this . preRotation = this . rotation , this . _sx = this . sprite . scale . x , this . _sy = this . sprite . scale . y , this . center . setTo ( this . position . x + this . halfWidth , this . position . y + this . halfHeight ) } , onFloor : function ( ) { return this . blocked . down } , onWall : function ( ) { return this . blocked . left || this . blocked . right } , deltaAbsX : function ( ) { return this . deltaX ( ) > 0 ? this . deltaX ( ) : - this . deltaX ( ) } , deltaAbsY : function ( ) { return this . deltaY ( ) > 0 ? this . deltaY ( ) : - this . deltaY ( ) } , deltaX : function ( ) { return this . position . x - this . prev . x } , deltaY : function ( ) { return this . position . y - this . prev . y } , deltaZ : function ( ) { return this . rotation - this . preRotation } } , Object . defineProperty ( b . Physics . Arcade . Body . prototype , "bottom" , { get : function ( ) { return this . position . y + this . height } } ) , Object . defineProperty ( b . Physics . Arcade . Body . prototype , "right" , { get : function ( ) { return this . position . x + this . width } } ) , Object . defineProperty ( b . Physics . Arcade . Body . prototype , "x" , { get : function ( ) { return this . position . x } , set : function ( a ) { this . position . x = a } } ) , Object . defineProperty ( b . Physics . Arcade . Body . prototype , "y" , { get : function ( ) { return this . position . y } , set : function ( a ) { this . position . y = a } } ) , b . Physics . Arcade . Body . render = function ( a , b , c , d ) { "undefined" == typeof c && ( c = ! 0 ) , d = d || "rgba(0,255,0,0.4)" , c ? ( a . fillStyle = d , a . fillRect ( b . position . x - b . game . camera . x , b . position . y - b . game . camera . y , b . width , b . height ) ) : ( a . strokeStyle = d , a . strokeRect ( b . position . x - b . game . camera . x , b . position . y - b . game . camera . y , b . width , b . height ) ) } , b . Physics . Arcade . Body . renderBodyInfo = function ( a , b ) { a . line ( "x: " + b . x . toFixed ( 2 ) , "y: " + b . y . toFixed ( 2 ) , "width: " + b . width , "height: " + b . height ) , a . line ( "velocity x: " + b . velocity . x . toFixed ( 2 ) , "y: " + b . velocity . y . toFixed ( 2 ) , "deltaX: " + b . _dx . toFixed ( 2 ) , "deltaY: " + b . _dy . toFixed ( 2 ) ) , a . line ( "acceleration x: " + b . acceleration . x . toFixed ( 2 ) , "y: " + b . acceleration . y . toFixed ( 2 ) , "speed: " + b . speed . toFixed ( 2 ) , "angle: " + b . angle . toFixed ( 2 ) ) , a . line ( "gravity x: " + b . gravity . x , "y: " + b . gravity . y , "bounce x: " + b . bounce . x . toFixed ( 2 ) , "y: " + b . bounce . y . toFixed ( 2 ) ) , a . line ( "touching left: " + b . touching . left , "right: " + b . touching . right , "up: " + b . touching . up , "down: " + b . touching . down ) , a . line ( "blocked left: " + b . blocked . left , "right: " + b . blocked . right , "up: " + b . blocked . up , "down: " + b . blocked . down ) } , b . Physics . Arcade . Body . prototype . constructor = b . Physics . Arcade . Body , b . Particles = function ( a ) { this . game = a , this . emitters = { } , this . ID = 0 } , b . Particles . prototype = { add : function ( a ) { return this . emitters [ a . name ] = a , a } , remove : function ( a ) { delete this . emitters [ a . name ] } , update : function ( ) { for ( var a in this . emitters ) this . emitters [ a ] . exist
} , parseTiledJSON : function ( a ) { if ( "orthogonal" !== a . orientation ) return console . warn ( "TilemapParser.parseTiledJSON: Only orthogonal map types are supported in this version of Phaser" ) , null ; var c = { } ; c . width = a . width , c . height = a . height , c . tileWidth = a . tilewidth , c . tileHeight = a . tileheight , c . orientation = a . orientation , c . version = a . version , c . properties = a . properties , c . widthInPixels = c . width * c . tileWidth , c . heightInPixels = c . height * c . tileHeight ; for ( var d = [ ] , e = 0 ; e < a . layers . length ; e ++ ) if ( "tilelayer" === a . layers [ e ] . type ) { var f = { name : a . layers [ e ] . name , x : a . layers [ e ] . x , y : a . layers [ e ] . y , width : a . layers [ e ] . width , height : a . layers [ e ] . height , widthInPixels : a . layers [ e ] . width * a . tilewidth , heightInPixels : a . layers [ e ] . height * a . tileheight , alpha : a . layers [ e ] . opacity , visible : a . layers [ e ] . visible , properties : { } , indexes : [ ] , callbacks : [ ] , bodies : [ ] } ; a . layers [ e ] . properties && ( f . properties = a . layers [ e ] . properties ) ; for ( var g = 0 , h = [ ] , i = [ ] , j = 0 , k = a . layers [ e ] . data . length ; k > j ; j ++ ) h . push ( a . layers [ e ] . data [ j ] > 0 ? new b . Tile ( f , a . layers [ e ] . data [ j ] , g , i . length , a . tilewidth , a . tileheight ) : null ) , g ++ , g === a . layers [ e ] . width && ( i . push ( h ) , g = 0 , h = [ ] ) ; f . data = i , d . push ( f ) } c . layers = d ; for ( var l = [ ] , e = 0 ; e < a . layers . length ; e ++ ) if ( "imagelayer" === a . layers [ e ] . type ) { var m = { name : a . layers [ e ] . name , image : a . layers [ e ] . image , x : a . layers [ e ] . x , y : a . layers [ e ] . y , alpha : a . layers [ e ] . opacity , visible : a . layers [ e ] . visible , properties : { } } ; a . layers [ e ] . properties && ( m . properties = a . layers [ e ] . properties ) , l . push ( m ) } c . images = l ; for ( var n = [ ] , e = 0 ; e < a . tilesets . length ; e ++ ) { var o = a . tilesets [ e ] , p = new b . Tileset ( o . name , o . firstgid , o . tilewidth , o . tileheight , o . margin , o . spacing , o . properties ) ; o . tileproperties && ( p . tileProperties = o . tileproperties ) , p . rows = Math . round ( ( o . imageheight - o . margin ) / ( o . tileheight + o . spacing ) ) , p . columns = Math . round ( ( o . imagewidth - o . margin ) / ( o . tilewidth + o . spacing ) ) , p . total = p . rows * p . columns , p . rows % 1 !== 0 || p . columns % 1 !== 0 ? console . warn ( "TileSet image dimensions do not match expected dimensions. Tileset width/height must be evenly divisible by Tilemap tile width/height." ) : n . push ( p ) } c . tilesets = n ; for ( var q = { } , r = { } , e = 0 ; e < a . layers . length ; e ++ ) if ( "objectgroup" === a . layers [ e ] . type ) { q [ a . layers [ e ] . name ] = [ ] , r [ a . layers [ e ] . name ] = [ ] ; for ( var s = 0 , k = a . layers [ e ] . objects . length ; k > s ; s ++ ) if ( a . layers [ e ] . objects [ s ] . gid ) { var t = { gid : a . layers [ e ] . objects [ s ] . gid , name : a . layers [ e ] . objects [ s ] . name , x : a . layers [ e ] . objects [ s ] . x , y : a . layers [ e ] . objects [ s ] . y , visible : a . layers [ e ] . objects [ s ] . visible , properties : a . layers [ e ] . objects [ s ] . properties } ; q [ a . layers [ e ] . name ] . push ( t ) } else if ( a . layers [ e ] . objects [ s ] . polyline ) { var t = { name : a . layers [ e ] . objects [ s ] . name , x : a . layers [ e ] . objects [ s ] . x , y : a . layers [ e ] . objects [ s ] . y , width : a . layers [ e ] . objects [ s ] . width , height : a . layers [ e ] . objects [ s ] . height , visible : a . layers [ e ] . objects [ s ] . visible , properties : a . layers [ e ] . objects [ s ] . properties } ; t . polyline = [ ] ; for ( var u = 0 ; u < a . layers [ e ] . objects [ s ] . polyline . length ; u ++ ) t . polyline . push ( [ a . layers [ e ] . objects [ s ] . polyline [ u ] . x , a . layers [ e ] . objects [ s ] . polyline [ u ] . y ] ) ; r [ a . layers [ e ] . name ] . push ( t ) } } c . objects = q , c . collision = r , c . tiles = [ ] ; for ( var e = 0 ; e < c . tilesets . length ; e ++ ) for ( var o = c . tilesets [ e ] , g = o . tileMargin , v = o . tileMargin , w = 0 , x = 0 , y = 0 , j = o . firstgid ; j < o . firstgid + o . total && ( c . tiles [ j ] = [ g , v , e ] , g += o . tileWidth + o . tileSpacing , w ++ , w !== o . total ) && ( x ++ , x !== o . columns || ( g = o . tileMargin , v += o . tileHeight + o . tileSpacing , x = 0 , y ++ , y !== o . rows ) ) ; j ++ ) ; return c } } , b . Tileset = function ( a , b , c , d , e , f , g ) { ( "undefined" == typeof c || 0 >= c ) && ( c = 32 ) , ( "undefined" == typeof d || 0 >= d ) && ( d = 32 ) , "undefined" == typeof e && ( e = 0 ) , "undefined" == typeof f && ( f = 0 ) , this . name = a , this . firstgid = b , this . tileWidth = c , this . tileHeight = d , this . tileMargin = e , this . tileSpacing = f , this . properties = g , this . image = null , this . rows = 0 , this . columns = 0 , this . total = 0 , this . drawCoords = [ ] } , b . Tileset . prototype = { draw : function ( a , b , c , d ) { this . image && this . drawCoords [ d ] && a . drawImage ( this . image , this . drawCoords [ d ] [ 0 ] , this . drawCoords [ d ] [ 1 ] , this . tileWidth , this . tileHeight , b , c , this . tileWidth , this . tileHeight ) } , setImage : function ( a ) { this . image = a , this . rows = Math . round ( ( a . height - this . tileMargin ) / ( this . tileHeight + this . tileSpacing ) ) , this . columns = Math . round ( ( a . width - this . tileMargin ) / ( this . tileWidth + this . tileSpacing ) ) , this . total = this . rows * this . columns , this . drawCoo