2016-06-17 11:46:47 +00:00
/* Phaser v2.5.0 - http://phaser.io - @photonstorm - (c) 2016 Photon Storm Ltd. */
2016-06-03 17:48:34 +00:00
2016-06-17 11:46:47 +00:00
( function ( ) { function a ( a , b ) { this . _scaleFactor = a , this . _deltaMode = b , this . originalEvent = null } var b = this , c = c || { VERSION : "2.5.0" , GAMES : [ ] , AUTO : 0 , CANVAS : 1 , WEBGL : 2 , HEADLESS : 3 , NONE : 0 , LEFT : 1 , RIGHT : 2 , UP : 3 , DOWN : 4 , SPRITE : 0 , BUTTON : 1 , IMAGE : 2 , GRAPHICS : 3 , TEXT : 4 , TILESPRITE : 5 , BITMAPTEXT : 6 , GROUP : 7 , RENDERTEXTURE : 8 , TILEMAP : 9 , TILEMAPLAYER : 10 , EMITTER : 11 , POLYGON : 12 , BITMAPDATA : 13 , CANVAS _FILTER : 14 , WEBGL _FILTER : 15 , ELLIPSE : 16 , SPRITEBATCH : 17 , RETROFONT : 18 , POINTER : 19 , ROPE : 20 , CIRCLE : 21 , RECTANGLE : 22 , LINE : 23 , MATRIX : 24 , POINT : 25 , ROUNDEDRECTANGLE : 26 , CREATURE : 27 , VIDEO : 28 , PENDING _ATLAS : - 1 , HORIZONTAL : 0 , VERTICAL : 1 , LANDSCAPE : 0 , PORTRAIT : 1 , ANGLE _UP : 270 , ANGLE _DOWN : 90 , ANGLE _LEFT : 180 , ANGLE _RIGHT : 0 , ANGLE _NORTH _EAST : 315 , ANGLE _NORTH _WEST : 225 , ANGLE _SOUTH _EAST : 45 , ANGLE _SOUTH _WEST : 135 , TOP _LEFT : 0 , TOP _CENTER : 1 , TOP _RIGHT : 2 , LEFT _TOP : 3 , LEFT _CENTER : 4 , LEFT _BOTTOM : 5 , CENTER : 6 , RIGHT _TOP : 7 , RIGHT _CENTER : 8 , RIGHT _BOTTOM : 9 , BOTTOM _LEFT : 10 , BOTTOM _CENTER : 11 , BOTTOM _RIGHT : 12 , 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 } , scaleModes : { DEFAULT : 0 , LINEAR : 0 , NEAREST : 1 } , PIXI : PIXI || { } } ; if ( Math . trunc || ( Math . trunc = function ( a ) { return 0 > a ? Math . ceil ( a ) : Math . floor ( a ) } ) , 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 ) } ) , Array . prototype . forEach || ( Array . prototype . forEach = function ( a ) { "use strict" ; if ( void 0 === this || null === this ) throw new TypeError ; var b = Object ( this ) , c = b . length >>> 0 ; if ( "function" != typeof a ) throw new TypeError ; for ( var d = arguments . length >= 2 ? arguments [ 1 ] : void 0 , e = 0 ; c > e ; e ++ ) e in b && a . call ( d , b [ e ] , e , b ) } ) , "function" != typeof window . Uint32Array && "object" != typeof window . Uint32Array ) { var d = function ( a ) { var b = new Array ; window [ a ] = function ( a ) { if ( "number" == typeof a ) { Array . call ( this , a ) , this . length = a ; for ( var b = 0 ; b < this . length ; b ++ ) this [ b ] = 0 } else { Array . call ( this , a . length ) , this . length = a . length ; for ( var b = 0 ; b < this . length ; b ++ ) this [ b ] = a [ b ] } } , window [ a ] . prototype = b , window [ a ] . constructor = window [ a ] } ; d ( "Uint32Array" ) , d ( "Int16Array" ) } window . console || ( window . console = { } , window . console . log = window . console . assert = function ( ) { } , window . console . warn = window . console . assert = function ( ) { } ) , c . Utils = { getProperty : function ( a , b ) { for ( var c = b . split ( "." ) , d = c . pop ( ) , e = c . length , f = 1 , g = c [ 0 ] ; e > f && ( a = a [ g ] ) ; ) g = c [ f ] , f ++ ; return a ? a [ d ] : null } , setProperty : function ( a , b , c ) { for ( var d = b . split ( "." ) , e = d . pop ( ) , f = d . length , g = 1 , h = d [ 0 ] ; f > g && ( a = a [ h ] ) ; ) h = d [ g ] , g ++ ; return a && ( a [ e ] = c ) , a } , chanceRoll : function ( a ) { return void 0 === a && ( a = 50 ) , a > 0 && 100 * Math . random ( ) <= a } , randomChoice : function ( a , b ) { return Math . random ( ) < . 5 ? a : b } , parseDimension : function ( a , b ) { var c = 0 , d = 0 ; return "string" == typeof a ? "%" === a . substr ( - 1 ) ? ( c = parseInt ( a , 10 ) / 100 , d = 0 === b ? window . innerWidth * c : window . innerHeight * c ) : d = parseInt ( a , 10 ) : d = a , d } , pad : function ( a , b , c , d ) { if ( void 0 === b ) var b = 0 ; if ( void 0 === c ) var c = " " ; if ( void 0 === d ) var d = 3 ; 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 , b , 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 ( b in a ) d = h [ b ] , e = a [ b ] , h !== e && ( k && e && ( c . Utils . isPlainObject ( e ) || ( f = Array . isArray ( e ) ) ) ? ( f ? ( f = ! 1 , g = d && Array . isArray ( d ) ? d : [ ] ) : g = d && c . Utils . isPlainObject ( d ) ? d : { } , h [ b ] = c . Utils . extend ( k , g , e ) ) : void 0 !== e && ( h
2016-06-17 00:11:24 +00:00
this . game . stage . addChild ( this . fx ) ) } , preUpdate : function ( ) { this . totalInView = 0 } , follow : function ( a , b , d , e ) { void 0 === b && ( b = c . Camera . FOLLOW _LOCKON ) , void 0 === d && ( d = 1 ) , void 0 === e && ( e = 1 ) , this . target = a , this . lerp . set ( d , e ) ; var f ; switch ( b ) { case c . Camera . FOLLOW _PLATFORMER : var g = this . width / 8 , h = this . height / 3 ; this . deadzone = new c . Rectangle ( ( this . width - g ) / 2 , ( this . height - h ) / 2 - . 25 * h , g , h ) ; break ; case c . Camera . FOLLOW _TOPDOWN : f = Math . max ( this . width , this . height ) / 4 , this . deadzone = new c . Rectangle ( ( this . width - f ) / 2 , ( this . height - f ) / 2 , f , f ) ; break ; case c . Camera . FOLLOW _TOPDOWN _TIGHT : f = Math . max ( this . width , this . height ) / 8 , this . deadzone = new c . Rectangle ( ( this . width - f ) / 2 , ( this . height - f ) / 2 , f , f ) ; break ; case c . Camera . FOLLOW _LOCKON : this . deadzone = null ; break ; default : this . deadzone = null } } , unfollow : function ( ) { this . target = null } , focusOn : function ( a ) { this . setPosition ( Math . round ( a . x - this . view . halfWidth ) , Math . round ( a . y - this . view . halfHeight ) ) } , focusOnXY : function ( a , b ) { this . setPosition ( Math . round ( a - this . view . halfWidth ) , Math . round ( b - this . view . halfHeight ) ) } , shake : function ( a , b , d , e , f ) { return void 0 === a && ( a = . 05 ) , void 0 === b && ( b = 500 ) , void 0 === d && ( d = ! 0 ) , void 0 === e && ( e = c . Camera . SHAKE _BOTH ) , void 0 === f && ( f = ! 0 ) , ! d && this . _shake . duration > 0 ? ! 1 : ( this . _shake . intensity = a , this . _shake . duration = b , this . _shake . shakeBounds = f , this . _shake . x = 0 , this . _shake . y = 0 , this . _shake . horizontal = e === c . Camera . SHAKE _BOTH || e === c . Camera . SHAKE _HORIZONTAL , this . _shake . vertical = e === c . Camera . SHAKE _BOTH || e === c . Camera . SHAKE _VERTICAL , ! 0 ) } , flash : function ( a , b , c ) { return void 0 === a && ( a = 16777215 ) , void 0 === b && ( b = 500 ) , void 0 === c && ( c = ! 1 ) , ! this . fx || ! c && this . _fxDuration > 0 ? ! 1 : ( this . fx . clear ( ) , this . fx . beginFill ( a ) , this . fx . drawRect ( 0 , 0 , this . width , this . height ) , this . fx . endFill ( ) , this . fx . alpha = 1 , this . _fxDuration = b , this . _fxType = 0 , ! 0 ) } , fade : function ( a , b , c ) { return void 0 === a && ( a = 0 ) , void 0 === b && ( b = 500 ) , void 0 === c && ( c = ! 1 ) , ! this . fx || ! c && this . _fxDuration > 0 ? ! 1 : ( this . fx . clear ( ) , this . fx . beginFill ( a ) , this . fx . drawRect ( 0 , 0 , this . width , this . height ) , this . fx . endFill ( ) , this . fx . alpha = 0 , this . _fxDuration = b , this . _fxType = 1 , ! 0 ) } , update : function ( ) { this . _fxDuration > 0 && this . updateFX ( ) , this . _shake . duration > 0 && this . updateShake ( ) , this . bounds && this . checkBounds ( ) , this . roundPx && ( this . view . floor ( ) , this . _shake . x = Math . floor ( this . _shake . x ) , this . _shake . y = Math . floor ( this . _shake . y ) ) , this . displayObject . position . x = - this . view . x , this . displayObject . position . y = - this . view . y } , updateFX : function ( ) { 0 === this . _fxType ? ( this . fx . alpha -= this . game . time . elapsedMS / this . _fxDuration , this . fx . alpha <= 0 && ( this . _fxDuration = 0 , this . fx . alpha = 0 , this . onFlashComplete . dispatch ( ) ) ) : ( this . fx . alpha += this . game . time . elapsedMS / this . _fxDuration , this . fx . alpha >= 1 && ( this . _fxDuration = 0 , this . fx . alpha = 1 , this . onFadeComplete . dispatch ( ) ) ) } , updateShake : function ( ) { this . _shake . duration -= this . game . time . elapsedMS , this . _shake . duration <= 0 ? ( this . onShakeComplete . dispatch ( ) , this . _shake . x = 0 , this . _shake . y = 0 ) : ( this . _shake . horizontal && ( this . _shake . x = this . game . rnd . frac ( ) * this . _shake . intensity * this . view . width * 2 - this . _shake . intensity * this . view . width ) , this . _shake . vertical && ( this . _shake . y = this . game . rnd . frac ( ) * this . _shake . intensity * this . view . height * 2 - this . _shake . intensity * this . view . height ) ) } , updateTarget : function ( ) { this . _targetPosition . x = this . view . x + this . target . worldPosition . x , this . _targetPosition . y = this . view . y + this . target . worldPosition . y , this . deadzone ? ( this . _edge = this . _targetPosition . x - this . view . x , this . _edge < this . deadzone . left ? this . view . x = this . game . math . linear ( this . view . x , this . _targetPosition . x - this . deadzone . left , this . lerp . x ) : this . _edge > this . deadzone . right && ( this . view . x = this . game . math . linear ( this . view . x , this . _targetPosition . x - this . deadzone . right , this . lerp . x ) ) , this . _edge = this . _targetPosition . y - this . view . y , this . _edge < this . deadzone . top ? this . view . y = this . game . math . linear ( this . view . y , this . _targetPosition . y - this . deadzone . top , this . lerp . y ) : this . _edge > this . deadzone . bottom && ( this . view . y = this . game . math . linear ( this . view . y , this . _targetPosition . y - this . deadzone . bottom , this . lerp . y ) ) ) : ( this . view . x = this . game . math . linear ( this . view . x , this . _targetPosition . x - this . view . halfWidth , this . lerp . x ) , this . view . y = this . game . math . linear ( this . view . y , this . _targetPosition . y - this . view . halfHeight
2016-06-17 11:46:47 +00:00
var f = b . length ; return 1 === f ? 0 === d ? a [ b [ 0 ] ] = c : 1 == d ? a [ b [ 0 ] ] += c : 2 == d ? a [ b [ 0 ] ] -= c : 3 == d ? a [ b [ 0 ] ] *= c : 4 == d && ( a [ b [ 0 ] ] /= c ) : 2 === f ? 0 === d ? a [ b [ 0 ] ] [ b [ 1 ] ] = c : 1 == d ? a [ b [ 0 ] ] [ b [ 1 ] ] += c : 2 == d ? a [ b [ 0 ] ] [ b [ 1 ] ] -= c : 3 == d ? a [ b [ 0 ] ] [ b [ 1 ] ] *= c : 4 == d && ( a [ b [ 0 ] ] [ b [ 1 ] ] /= c ) : 3 === f ? 0 === d ? a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] = c : 1 == d ? a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] += c : 2 == d ? a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] -= c : 3 == d ? a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] *= c : 4 == d && ( a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] /= c ) : 4 === f && ( 0 === d ? a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] [ b [ 3 ] ] = c : 1 == d ? a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] [ b [ 3 ] ] += c : 2 == d ? a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] [ b [ 3 ] ] -= c : 3 == d ? a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] [ b [ 3 ] ] *= c : 4 == d && ( a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] [ b [ 3 ] ] /= c ) ) , ! 0 } , c . Group . prototype . checkProperty = function ( a , b , d , e ) { return void 0 === e && ( e = ! 1 ) , ! c . Utils . getProperty ( a , b ) && e ? ! 1 : c . Utils . getProperty ( a , b ) !== d ? ! 1 : ! 0 } , c . Group . prototype . set = function ( a , b , c , d , e , f , g ) { return void 0 === g && ( g = ! 1 ) , b = b . split ( "." ) , void 0 === d && ( d = ! 1 ) , void 0 === e && ( e = ! 1 ) , ( d === ! 1 || d && a . alive ) && ( e === ! 1 || e && a . visible ) ? this . setProperty ( a , b , c , f , g ) : void 0 } , c . Group . prototype . setAll = function ( a , b , c , d , e , f ) { void 0 === c && ( c = ! 1 ) , void 0 === d && ( d = ! 1 ) , void 0 === f && ( f = ! 1 ) , a = a . split ( "." ) , e = e || 0 ; for ( var g = 0 ; g < this . children . length ; g ++ ) ( ! c || c && this . children [ g ] . alive ) && ( ! d || d && this . children [ g ] . visible ) && this . setProperty ( this . children [ g ] , a , b , e , f ) } , c . Group . prototype . setAllChildren = function ( a , b , d , e , f , g ) { void 0 === d && ( d = ! 1 ) , void 0 === e && ( e = ! 1 ) , void 0 === g && ( g = ! 1 ) , f = f || 0 ; for ( var h = 0 ; h < this . children . length ; h ++ ) ( ! d || d && this . children [ h ] . alive ) && ( ! e || e && this . children [ h ] . visible ) && ( this . children [ h ] instanceof c . Group ? this . children [ h ] . setAllChildren ( a , b , d , e , f , g ) : this . setProperty ( this . children [ h ] , a . split ( "." ) , b , f , g ) ) } , c . Group . prototype . checkAll = function ( a , b , c , d , e ) { void 0 === c && ( c = ! 1 ) , void 0 === d && ( d = ! 1 ) , void 0 === e && ( e = ! 1 ) ; for ( var f = 0 ; f < this . children . length ; f ++ ) if ( ( ! c || c && this . children [ f ] . alive ) && ( ! d || d && this . children [ f ] . visible ) && ! this . checkProperty ( this . children [ f ] , a , b , e ) ) return ! 1 ; return ! 0 } , c . Group . prototype . addAll = function ( a , b , c , d ) { this . setAll ( a , b , c , d , 1 ) } , c . Group . prototype . subAll = function ( a , b , c , d ) { this . setAll ( a , b , c , d , 2 ) } , c . Group . prototype . multiplyAll = function ( a , b , c , d ) { this . setAll ( a , b , c , d , 3 ) } , c . Group . prototype . divideAll = function ( a , b , c , d ) { this . setAll ( a , b , c , d , 4 ) } , c . Group . prototype . callAllExists = function ( a , b ) { var c ; if ( arguments . length > 2 ) { c = [ ] ; for ( var d = 2 ; d < arguments . length ; d ++ ) c . push ( arguments [ d ] ) } for ( var d = 0 ; d < this . children . length ; d ++ ) this . children [ d ] . exists === b && this . children [ d ] [ a ] && this . children [ d ] [ a ] . apply ( this . children [ d ] , c ) } , c . Group . prototype . callbackFromArray = function ( a , b , c ) { if ( 1 == c ) { if ( a [ b [ 0 ] ] ) return a [ b [ 0 ] ] } else if ( 2 == c ) { if ( a [ b [ 0 ] ] [ b [ 1 ] ] ) return a [ b [ 0 ] ] [ b [ 1 ] ] } else if ( 3 == c ) { if ( a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] ) return a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] } else if ( 4 == c ) { if ( a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] [ b [ 3 ] ] ) return a [ b [ 0 ] ] [ b [ 1 ] ] [ b [ 2 ] ] [ b [ 3 ] ] } else if ( a [ b ] ) return a [ b ] ; return ! 1 } , c . Group . prototype . callAll = function ( a , b ) { if ( void 0 !== a ) { a = a . split ( "." ) ; var c = a . length ; if ( void 0 === b || null === b || "" === b ) b = null ; else if ( "string" == typeof b ) { b = b . split ( "." ) ; var d = b . length } var e ; if ( arguments . length > 2 ) { e = [ ] ; for ( var f = 2 ; f < arguments . length ; f ++ ) e . push ( arguments [ f ] ) } for ( var g = null , h = null , f = 0 ; f < this . children . length ; f ++ ) g = this . callbackFromArray ( this . children [ f ] , a , c ) , b && g ? ( h = this . callbackFromArray ( this . children [ f ] , b , d ) , g && g . apply ( h , e ) ) : g && g . apply ( this . children [ f ] , e ) } } , c . Group . prototype . preUpdate = function ( ) { if ( this . pendingDestroy ) return this . destroy ( ) , ! 1 ; if ( ! this . exists || ! this . parent . exists ) return this . renderOrderID = - 1 , ! 1 ; for ( var a = 0 ; a < this . children . length ; a ++ ) this . children [ a ] . preUpdate ( ) ; return ! 0 } , c . Group . prototype . update = function ( ) { for ( var a = this . children . length ; a -- ; ) this . children [ a ] . update ( ) } , c . Group . prototype . postUpdate = function ( ) { this . fixedToCamera && ( this . x = this . game . camera . view . x + this . cameraOffset . x , this . y = this . game . camera . view . y + this . cameraOffset . y ) ; for ( var a = 0 ; a < this . children . length ; a ++ ) this . children [ a ] . postUpdate ( ) } , c . Group . prototype . filter = function ( a , b ) { for ( var d = - 1 , e = this . children . length , f = [ ] ; ++ d < e ; ) { var g = this . children [ d ] ; ( ! b || b && g . exists ) && a ( g , d , this . children ) && f . push ( g ) } return new c . ArraySet ( f ) } , c . Group . prototype . forEach = function ( a , b , c ) { if ( void 0 === c && ( c = ! 1 ) , arguments . length <= 3 ) for ( var d = 0 ; d < this . children . length ; d ++ ) ( ! c || c && this . children [ d ] . exists ) && a . call ( b , this .
2016-06-17 00:11:24 +00:00
this . mouseDownCallback && this . mouseDownCallback . call ( this . callbackContext , a ) , this . input . enabled && this . enabled && ( a . identifier = 0 , this . input . mousePointer . start ( a ) ) } , onMouseMove : function ( a ) { this . event = a , this . capture && a . preventDefault ( ) , this . mouseMoveCallback && this . mouseMoveCallback . call ( this . callbackContext , a ) , this . input . enabled && this . enabled && ( a . identifier = 0 , this . input . mousePointer . move ( a ) ) } , onMouseUp : function ( a ) { this . event = a , this . capture && a . preventDefault ( ) , this . mouseUpCallback && this . mouseUpCallback . call ( this . callbackContext , a ) , this . input . enabled && this . enabled && ( a . identifier = 0 , this . input . mousePointer . stop ( a ) ) } , onMouseUpGlobal : function ( a ) { this . input . mousePointer . withinGame || ( this . mouseUpCallback && this . mouseUpCallback . call ( this . callbackContext , a ) , a . identifier = 0 , this . input . mousePointer . stop ( a ) ) } , onMouseOutGlobal : function ( a ) { this . event = a , this . capture && a . preventDefault ( ) , this . input . mousePointer . withinGame = ! 1 , this . input . enabled && this . enabled && ( this . input . mousePointer . stop ( a ) , this . input . mousePointer . leftButton . stop ( a ) , this . input . mousePointer . rightButton . stop ( a ) ) } , onMouseOut : function ( a ) { this . event = a , this . capture && a . preventDefault ( ) , this . input . mousePointer . withinGame = ! 1 , this . mouseOutCallback && this . mouseOutCallback . call ( this . callbackContext , a ) , this . input . enabled && this . enabled && this . stopOnGameOut && ( a . identifier = 0 , this . input . mousePointer . stop ( a ) ) } , onMouseOver : function ( a ) { this . event = a , this . capture && a . preventDefault ( ) , this . input . mousePointer . withinGame = ! 0 , this . mouseOverCallback && this . mouseOverCallback . call ( this . callbackContext , a ) } , onMouseWheel : function ( a ) { this . _wheelEvent && ( a = this . _wheelEvent . bindEvent ( a ) ) , this . event = a , this . capture && a . preventDefault ( ) , this . wheelDelta = c . Math . clamp ( - a . deltaY , - 1 , 1 ) , this . mouseWheelCallback && this . mouseWheelCallback . call ( this . callbackContext , a ) } , requestPointerLock : function ( ) { if ( this . game . device . pointerLock ) { var a = this . game . canvas ; a . requestPointerLock = a . requestPointerLock || a . mozRequestPointerLock || a . webkitRequestPointerLock , a . requestPointerLock ( ) ; var b = this ; this . _pointerLockChange = function ( a ) { return b . pointerLockChange ( a ) } , document . addEventListener ( "pointerlockchange" , this . _pointerLockChange , ! 0 ) , document . addEventListener ( "mozpointerlockchange" , this . _pointerLockChange , ! 0 ) , document . addEventListener ( "webkitpointerlockchange" , this . _pointerLockChange , ! 0 ) } } , pointerLockChange : function ( a ) { var b = this . game . canvas ; document . pointerLockElement === b || document . mozPointerLockElement === b || document . webkitPointerLockElement === b ? ( this . locked = ! 0 , this . pointerLock . dispatch ( ! 0 , a ) ) : ( this . locked = ! 1 , this . pointerLock . dispatch ( ! 1 , a ) ) } , releasePointerLock : function ( ) { document . exitPointerLock = document . exitPointerLock || document . mozExitPointerLock || document . webkitExitPointerLock , document . exitPointerLock ( ) , document . removeEventListener ( "pointerlockchange" , this . _pointerLockChange , ! 0 ) , document . removeEventListener ( "mozpointerlockchange" , this . _pointerLockChange , ! 0 ) , document . removeEventListener ( "webkitpointerlockchange" , this . _pointerLockChange , ! 0 ) } , stop : function ( ) { var a = this . game . canvas ; a . removeEventListener ( "mousedown" , this . _onMouseDown , ! 0 ) , a . removeEventListener ( "mousemove" , this . _onMouseMove , ! 0 ) , a . removeEventListener ( "mouseup" , this . _onMouseUp , ! 0 ) , a . removeEventListener ( "mouseover" , this . _onMouseOver , ! 0 ) , a . removeEventListener ( "mouseout" , this . _onMouseOut , ! 0 ) ; var b = this . game . device . wheelEvent ; b && a . removeEventListener ( b , this . _onMouseWheel , ! 0 ) , window . removeEventListener ( "mouseup" , this . _onMouseUpGlobal , ! 0 ) , window . removeEventListener ( "mouseout" , this . _onMouseOutGlobal , ! 0 ) , document . removeEventListener ( "pointerlockchange" , this . _pointerLockChange , ! 0 ) , document . removeEventListener ( "mozpointerlockchange" , this . _pointerLockChange , ! 0 ) , document . removeEventListener ( "webkitpointerlockchange" , this . _pointerLockChange , ! 0 ) } } , c . Mouse . prototype . constructor = c . Mouse , a . prototype = { } , a . prototype . constructor = a , a . prototype . bindEvent = function ( b ) { if ( ! a . _stubsGenerated && b ) { var c = function ( a ) { return function ( ) { var b = this . originalEvent [ a ] ; return "function" != typeof b ? b : b . bind ( this . originalEvent ) } } ; for ( var d in b ) d in a . prototype || Object . defineProperty ( a . prototype , d , { get : c ( d ) } ) ; a . _stubsGenerate
null === this . sprite ) ) return ; this . draggable && this . isDragged === ! 1 && ( 0 === this . dragTimeThreshold && 0 === this . dragDistanceThreshold ? this . startDrag ( a ) : ( this . _pendingDrag = ! 0 , this . _dragDistancePass = 0 === this . dragDistanceThreshold , this . dragTimeThreshold > 0 ? ( this . _dragTimePass = ! 1 , this . game . time . events . add ( this . dragTimeThreshold , this . dragTimeElapsed , this , a ) ) : this . _dragTimePass = ! 0 ) ) , this . bringToTop && this . sprite . bringToTop ( ) } } } , dragTimeElapsed : function ( a ) { this . _dragTimePass = ! 0 , this . _pendingDrag && this . sprite && this . _dragDistancePass && this . startDrag ( a ) } , _releasedHandler : function ( a ) { if ( null !== this . sprite ) { var b = this . _pointerData [ a . id ] ; if ( b . isDown && a . isUp ) { b . isDown = ! 1 , b . isUp = ! 0 , b . timeUp = this . game . time . time , b . downDuration = b . timeUp - b . timeDown ; var d = this . checkPointerOver ( a ) ; this . sprite && this . sprite . events && ( this . dragStopBlocksInputUp && ( ! this . dragStopBlocksInputUp || this . draggable && this . isDragged && this . _draggedPointerID === a . id ) || this . sprite . events . onInputUp$dispatch ( this . sprite , a , d ) , this . sprite && this . sprite . parent && this . sprite . parent . type === c . GROUP && this . sprite . parent . onChildInputUp . dispatch ( this . sprite , a , d ) , d && ( d = this . checkPointerOver ( a ) ) ) , b . isOver = d , ! d && this . useHandCursor && ( this . game . canvas . style . cursor = "default" , this . _setHandCursor = ! 1 ) , a . dirty = ! 0 , this . _pendingDrag = ! 1 , this . draggable && this . isDragged && this . _draggedPointerID === a . id && this . stopDrag ( a ) } } } , updateDrag : function ( a , b ) { if ( a . isUp ) return this . stopDrag ( a ) , ! 1 ; void 0 === b && ( b = ! 1 ) ; var c = this . globalToLocalX ( a . x ) + this . _dragPoint . x + this . dragOffset . x , d = this . globalToLocalY ( a . y ) + this . _dragPoint . y + this . dragOffset . y ; if ( this . sprite . fixedToCamera ) this . allowHorizontalDrag && ( this . sprite . cameraOffset . x = c ) , this . allowVerticalDrag && ( this . sprite . cameraOffset . y = d ) , this . boundsRect && this . checkBoundsRect ( ) , this . boundsSprite && this . checkBoundsSprite ( ) , this . snapOnDrag && ( this . sprite . cameraOffset . x = Math . round ( ( this . sprite . cameraOffset . x - this . snapOffsetX % this . snapX ) / this . snapX ) * this . snapX + this . snapOffsetX % this . snapX , this . sprite . cameraOffset . y = Math . round ( ( this . sprite . cameraOffset . y - this . snapOffsetY % this . snapY ) / this . snapY ) * this . snapY + this . snapOffsetY % this . snapY , this . snapPoint . set ( this . sprite . cameraOffset . x , this . sprite . cameraOffset . y ) ) ; else { var e = this . game . camera . x - this . _pointerData [ a . id ] . camX , f = this . game . camera . y - this . _pointerData [ a . id ] . camY ; this . allowHorizontalDrag && ( this . sprite . x = c + e ) , this . allowVerticalDrag && ( this . sprite . y = d + f ) , this . boundsRect && this . checkBoundsRect ( ) , this . boundsSprite && this . checkBoundsSprite ( ) , this . snapOnDrag && ( this . sprite . x = Math . round ( ( this . sprite . x - this . snapOffsetX % this . snapX ) / this . snapX ) * this . snapX + this . snapOffsetX % this . snapX , this . sprite . y = Math . round ( ( this . sprite . y - this . snapOffsetY % this . snapY ) / this . snapY ) * this . snapY + this . snapOffsetY % this . snapY , this . snapPoint . set ( this . sprite . x , this . sprite . y ) ) } return this . sprite . events . onDragUpdate . dispatch ( this . sprite , a , c , d , this . snapPoint , b ) , ! 0 } , justOver : function ( a , b ) { return a = a || 0 , b = b || 500 , this . _pointerData [ a ] . isOver && this . overDuration ( a ) < b } , justOut : function ( a , b ) { return a = a || 0 , b = b || 500 , this . _pointerData [ a ] . isOut && this . game . time . time - this . _pointerData [ a ] . timeOut < b } , justPressed : function ( a , b ) { return a = a || 0 , b = b || 500 , this . _pointerData [ a ] . isDown && this . downDuration ( a ) < b } , justReleased : function ( a , b ) { return a = a || 0 , b = b || 500 , this . _pointerData [ a ] . isUp && this . game . time . time - this . _pointerData [ a ] . timeUp < b } , overDuration : function ( a ) { return a = a || 0 , this . _pointerData [ a ] . isOver ? this . game . time . time - this . _pointerData [ a ] . timeOver : - 1 } , downDuration : function ( a ) { return a = a || 0 , this . _pointerData [ a ] . isDown ? this . game . time . time - this . _pointerData [ a ] . timeDown : - 1 } , enableDrag : function ( a , b , d , e , f , g ) { void 0 === a && ( a = ! 1 ) , void 0 === b && ( b = ! 1 ) , void 0 === d && ( d = ! 1 ) , void 0 === e && ( e = 255 ) , void 0 === f && ( f = null ) , void 0 === g && ( g = null ) , this . _dragPoint = new c . Point , this . draggable = ! 0 , this . bringToTop = b , this . dragOffset = new c . Point , this . dragFromCenter = a , this . pixelPerfectClick = d , this . pixelPerfectAlpha = e , f && ( this . boundsRect = f ) , g && ( this . boundsSprite = g ) } , disableDrag : function ( ) { if ( this . _pointerData ) for ( var a = 0 ; 10 > a ; a ++ ) this . _pointerData [ a ] . isDragged = ! 1 ; this . draggable = ! 1 , this . isDragged = ! 1 , this . _draggedPointerID = - 1 , this . _pendingDrag = ! 1 } , startD
this . body && this . body . type === c . Physics . P2JS && this . body . addToWorld ( ) , this . visible = ! 0 ) : ( this . _exists = ! 1 , this . body && this . body . type === c . Physics . P2JS && this . body . removeFromWorld ( ) , this . visible = ! 1 ) } } , update : function ( ) { } , postUpdate : function ( ) { this . customRender && this . key . render ( ) , this . components . PhysicsBody && c . Component . PhysicsBody . postUpdate . call ( this ) , this . components . FixedToCamera && c . Component . FixedToCamera . postUpdate . call ( this ) ; for ( var a = 0 ; a < this . children . length ; a ++ ) this . children [ a ] . postUpdate ( ) } } , c . Component . Crop = function ( ) { } , c . Component . Crop . prototype = { cropRect : null , _crop : null , crop : function ( a , b ) { void 0 === b && ( b = ! 1 ) , a ? ( b && null !== this . cropRect ? this . cropRect . setTo ( a . x , a . y , a . width , a . height ) : b && null === this . cropRect ? this . cropRect = new c . Rectangle ( a . x , a . y , a . width , a . height ) : this . cropRect = a , this . updateCrop ( ) ) : ( this . _crop = null , this . cropRect = null , this . resetFrame ( ) ) } , updateCrop : function ( ) { if ( this . cropRect ) { this . _crop = c . Rectangle . clone ( this . cropRect , this . _crop ) , this . _crop . x += this . _frame . x , this . _crop . y += this . _frame . y ; var a = Math . max ( this . _frame . x , this . _crop . x ) , b = Math . max ( this . _frame . y , this . _crop . y ) , d = Math . min ( this . _frame . right , this . _crop . right ) - a , e = Math . min ( this . _frame . bottom , this . _crop . bottom ) - b ; this . texture . crop . x = a , this . texture . crop . y = b , this . texture . crop . width = d , this . texture . crop . height = e , this . texture . frame . width = Math . min ( d , this . cropRect . width ) , this . texture . frame . height = Math . min ( e , this . cropRect . height ) , this . texture . width = this . texture . frame . width , this . texture . height = this . texture . frame . height , this . texture . _updateUvs ( ) } } } , c . Component . Delta = function ( ) { } , c . Component . Delta . prototype = { deltaX : { get : function ( ) { return this . world . x - this . previousPosition . x } } , deltaY : { get : function ( ) { return this . world . y - this . previousPosition . y } } , deltaZ : { get : function ( ) { return this . rotation - this . previousRotation } } } , c . Component . Destroy = function ( ) { } , c . Component . Destroy . prototype = { destroyPhase : ! 1 , destroy : function ( a , b ) { if ( null !== this . game && ! this . destroyPhase ) { void 0 === a && ( a = ! 0 ) , void 0 === b && ( b = ! 1 ) , this . destroyPhase = ! 0 , this . events && this . events . onDestroy$dispatch ( this ) , this . parent && ( this . parent instanceof c . 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 ( ) , this . game . tweens . removeFrom ( this ) ; var d = this . children . length ; if ( a ) for ( ; d -- ; ) this . children [ d ] . destroy ( a ) ; else for ( ; d -- ; ) this . removeChild ( this . children [ d ] ) ; this . _crop && ( this . _crop = null ) , this . _frame && ( this . _frame = null ) , c . Video && this . key instanceof c . Video && this . key . onChangeSource . remove ( this . resizeFrame , this ) , c . BitmapText && this . _glyphs && ( this . _glyphs = [ ] ) , this . alive = ! 1 , this . exists = ! 1 , this . visible = ! 1 , this . filters = null , this . mask = null , this . game = null , this . data = { } , this . renderable = ! 1 , this . transformCallback && ( this . transformCallback = null , this . transformCallbackContext = null ) , this . hitArea = null , this . parent = null , this . stage = null , this . worldTransform = null , this . filterArea = null , this . _bounds = null , this . _currentBounds = null , this . _mask = null , this . _destroyCachedSprite ( ) , b && this . texture . destroy ( ! 0 ) , this . destroyPhase = ! 1 , this . pendingDestroy = ! 1 } } } , c . Events = function ( a ) { this . parent = a } , c . Events . prototype = { destroy : function ( ) { this . _parent = null , this . _onDestroy && this . _onDestroy . dispose ( ) , this . _onAddedToGroup && this . _onAddedToGroup . dispose ( ) , this . _onRemovedFromGroup && this . _onRemovedFromGroup . dispose ( ) , this . _onRemovedFromWorld && this . _onRemovedFromWorld . dispose ( ) , this . _onKilled && this . _onKilled . dispose ( ) , this . _onRevived && this . _onRevived . dispose ( ) , this . _onEnterBounds && this . _onEnterBounds . dispose ( ) , this . _onOutOfBounds && this . _onOutOfBounds . dispose ( ) , this . _onInputOver && this . _onInputOver . dispose ( ) , this . _onInputOut && this . _onInputOut . dispose ( ) , this . _onInputDown && this . _onInputDown . dispose ( ) , this . _onInputUp && this . _onInputUp . dispose ( ) , this . _onDragStart && this . _onDragStart . dispose ( ) , this . _onDragUpdate && this . _onDragUpdate . dispose ( ) , this . _onDragStop && this . _onDragStop . dispose ( ) , this . _onAnimationStart && this . _onAnimationStart . dispose ( ) , this . _onAnimationComplete && this . _onAnimationComplete . dispose ( ) , this . _onAnimationLoop && this . _onAnimation
16777215 !== a . tint && ( a . cachedTint !== a . tint && ( a . cachedTint = a . tint , a . tintedTexture = PIXI . CanvasTinter . getTintedTexture ( a , a . tint ) ) , this . _image = a . tintedTexture , this . _pos . set ( 0 ) ) ; else { if ( this . _pos . set ( 0 ) , this . _scale . set ( 1 ) , this . _anchor . set ( 0 ) , this . _rotate = 0 , this . _alpha . current = 1 , a instanceof c . BitmapData ) this . _image = a . canvas ; else if ( "string" == typeof a ) { if ( a = this . game . cache . getImage ( a ) , null === a ) return ; this . _image = a } this . _size . set ( this . _image . width , this . _image . height ) } if ( ( void 0 === b || null === b ) && ( b = 0 ) , ( void 0 === d || null === d ) && ( d = 0 ) , e && ( this . _size . x = e ) , f && ( this . _size . y = f ) , ( void 0 === g || null === g ) && ( g = b ) , ( void 0 === h || null === h ) && ( h = d ) , ( void 0 === i || null === i ) && ( i = this . _size . x ) , ( void 0 === j || null === j ) && ( j = this . _size . y ) , "number" == typeof k && ( this . _rotate = k ) , "number" == typeof l && ( this . _anchor . x = l ) , "number" == typeof m && ( this . _anchor . y = m ) , "number" == typeof n && ( this . _scale . x = n ) , "number" == typeof o && ( this . _scale . y = o ) , "number" == typeof p && ( this . _alpha . current = p ) , void 0 === q && ( q = null ) , void 0 === r && ( r = ! 1 ) , ! ( this . _alpha . current <= 0 || 0 === this . _scale . x || 0 === this . _scale . y || 0 === this . _size . x || 0 === this . _size . y ) ) { var s = this . context ; return this . _alpha . prev = s . globalAlpha , s . save ( ) , s . globalAlpha = this . _alpha . current , q && ( this . op = q ) , r && ( g |= 0 , h |= 0 ) , s . translate ( g , h ) , s . scale ( this . _scale . x , this . _scale . y ) , s . rotate ( this . _rotate ) , s . drawImage ( this . _image , this . _pos . x + b , this . _pos . y + d , this . _size . x , this . _size . y , - i * this . _anchor . x , - j * this . _anchor . y , i , j ) , s . restore ( ) , s . globalAlpha = this . _alpha . prev , this . dirty = ! 0 , this } } , copyTransform : function ( a , b , d ) { if ( void 0 === b && ( b = null ) , void 0 === d && ( d = ! 1 ) , ! a . hasOwnProperty ( "worldTransform" ) || ! a . worldVisible || 0 === a . worldAlpha ) return this ; var e = a . worldTransform ; if ( this . _pos . set ( a . texture . crop . x , a . texture . crop . y ) , this . _size . set ( a . texture . crop . width , a . texture . crop . height ) , 0 === e . a || 0 === e . d || 0 === this . _size . x || 0 === this . _size . y ) return this ; a . texture instanceof c . RenderTexture || a . texture instanceof PIXI . RenderTexture ? this . _image = a . texture . getCanvas ( ) : this . _image = a . texture . baseTexture . source ; var f = e . tx , g = e . ty ; a . texture . trim && ( f += a . texture . trim . x - a . anchor . x * a . texture . trim . width , g += a . texture . trim . y - a . anchor . y * a . texture . trim . height ) , 16777215 !== a . tint && ( a . cachedTint !== a . tint && ( a . cachedTint = a . tint , a . tintedTexture = PIXI . CanvasTinter . getTintedTexture ( a , a . tint ) ) , this . _image = a . tintedTexture , this . _pos . set ( 0 ) ) , d && ( f |= 0 , g |= 0 ) ; var h = this . context ; return this . _alpha . prev = h . globalAlpha , h . save ( ) , h . globalAlpha = this . _alpha . current , b && ( this . op = b ) , h [ this . smoothProperty ] = a . texture . baseTexture . scaleMode === PIXI . scaleModes . LINEAR , h . setTransform ( e . a , e . b , e . c , e . d , f , g ) , h . drawImage ( this . _image , this . _pos . x , this . _pos . y , this . _size . x , this . _size . y , - this . _size . x * a . anchor . x , - this . _size . y * a . anchor . y , this . _size . x , this . _size . y ) , h . restore ( ) , h . globalAlpha = this . _alpha . prev , this . dirty = ! 0 , this } , copyRect : function ( a , b , c , d , e , f , g ) { return this . copy ( a , b . x , b . y , b . width , b . height , c , d , b . width , b . height , 0 , 0 , 0 , 1 , 1 , e , f , g ) } , draw : function ( a , b , c , d , e , f , g ) { return this . copy ( a , null , null , null , null , b , c , d , e , null , null , null , null , null , null , f , g ) } , drawGroup : function ( a , b , c ) { return a . total > 0 && a . forEachExists ( this . drawGroupProxy , this , b , c ) , this } , drawGroupProxy : function ( a , b , d ) { if ( a . hasOwnProperty ( "texture" ) && this . copyTransform ( a , b , d ) , a . type === c . GROUP && a . exists ) this . drawGroup ( a , b , d ) ; else if ( a . hasOwnProperty ( "children" ) && a . children . length > 0 ) for ( var e = 0 ; e < a . children . length ; e ++ ) a . children [ e ] . exists && this . copyTransform ( a . children [ e ] , b , d ) } , drawFull : function ( a , b , d ) { if ( a . worldVisible === ! 1 || 0 === a . worldAlpha || a . hasOwnProperty ( "exists" ) && a . exists === ! 1 ) return this ; if ( a . type !== c . GROUP && a . type !== c . EMITTER && a . type !== c . BITMAPTEXT ) if ( a . type === c . GRAPHICS ) { var e = a . getBounds ( ) ; this . ctx . save ( ) , this . ctx . translate ( e . x , e . y ) , PIXI . CanvasGraphics . renderGraphics ( a , this . ctx ) , this . ctx . restore ( ) } else this . copy ( a , null , null , null , null , a . worldPosition . x , a . worldPosition . y , null , null , a . worldRotation , null , null , a . worldScale . x , a . worldScale . y , a . worldAlpha , b , d ) ; if ( a . children ) for ( var f = 0 ; f < a . children . length ; f ++ ) this . drawFull ( a . children [ f ] , b , d ) ; return this } , shadow : function ( a , b , c , d ) { var e = this . context ; void 0 === a || null === a ? e . shadowColor = "rgba(0,0,0,0)" : ( e . shadowColor = a , e . shadowBlur = b || 5 , e
q . push ( r ++ , r ++ ) ; q . push ( r - 1 ) } if ( a . lineWidth ) { var s = a . points ; for ( a . points = [ ] , j = 0 ; h + 1 > j ; j ++ ) a . points . push ( f + Math . sin ( i * j ) * c , g + Math . cos ( i * j ) * d ) ; PIXI . WebGLGraphics . buildLine ( a , b ) , a . points = s } } , PIXI . WebGLGraphics . buildLine = function ( a , b ) { var c = 0 , d = a . points ; if ( 0 !== d . length ) { if ( a . lineWidth % 2 ) for ( c = 0 ; c < d . length ; c ++ ) d [ c ] += . 5 ; var e = new PIXI . Point ( d [ 0 ] , d [ 1 ] ) , f = new PIXI . Point ( d [ d . length - 2 ] , d [ d . length - 1 ] ) ; if ( e . x === f . x && e . y === f . y ) { d = d . slice ( ) , d . pop ( ) , d . pop ( ) , f = new PIXI . Point ( d [ d . length - 2 ] , d [ d . length - 1 ] ) ; var g = f . x + . 5 * ( e . x - f . x ) , h = f . y + . 5 * ( e . y - f . y ) ; d . unshift ( g , h ) , d . push ( g , h ) } var i , j , k , l , m , n , o , p , q , r , s , t , u , v , w , x , y , z , A , B , C , D , E , F = b . points , G = b . indices , H = d . length / 2 , I = d . length , J = F . length / 6 , K = a . lineWidth / 2 , L = PIXI . hex2rgb ( a . lineColor ) , M = a . lineAlpha , N = L [ 0 ] * M , O = L [ 1 ] * M , P = L [ 2 ] * M ; for ( k = d [ 0 ] , l = d [ 1 ] , m = d [ 2 ] , n = d [ 3 ] , q = - ( l - n ) , r = k - m , E = Math . sqrt ( q * q + r * r ) , q /= E , r /= E , q *= K , r *= K , F . push ( k - q , l - r , N , O , P , M ) , F . push ( k + q , l + r , N , O , P , M ) , c = 1 ; H - 1 > c ; c ++ ) k = d [ 2 * ( c - 1 ) ] , l = d [ 2 * ( c - 1 ) + 1 ] , m = d [ 2 * c ] , n = d [ 2 * c + 1 ] , o = d [ 2 * ( c + 1 ) ] , p = d [ 2 * ( c + 1 ) + 1 ] , q = - ( l - n ) , r = k - m , E = Math . sqrt ( q * q + r * r ) , q /= E , r /= E , q *= K , r *= K , s = - ( n - p ) , t = m - o , E = Math . sqrt ( s * s + t * t ) , s /= E , t /= E , s *= K , t *= K , w = - r + l - ( - r + n ) , x = - q + m - ( - q + k ) , y = ( - q + k ) * ( - r + n ) - ( - q + m ) * ( - r + l ) , z = - t + p - ( - t + n ) , A = - s + m - ( - s + o ) , B = ( - s + o ) * ( - t + n ) - ( - s + m ) * ( - t + p ) , C = w * A - z * x , Math . abs ( C ) < . 1 ? ( C += 10.1 , F . push ( m - q , n - r , N , O , P , M ) , F . push ( m + q , n + r , N , O , P , M ) ) : ( i = ( x * B - A * y ) / C , j = ( z * y - w * B ) / C , D = ( i - m ) * ( i - m ) + ( j - n ) + ( j - n ) , D > 19600 ? ( u = q - s , v = r - t , E = Math . sqrt ( u * u + v * v ) , u /= E , v /= E , u *= K , v *= K , F . push ( m - u , n - v ) , F . push ( N , O , P , M ) , F . push ( m + u , n + v ) , F . push ( N , O , P , M ) , F . push ( m - u , n - v ) , F . push ( N , O , P , M ) , I ++ ) : ( F . push ( i , j ) , F . push ( N , O , P , M ) , F . push ( m - ( i - m ) , n - ( j - n ) ) , F . push ( N , O , P , M ) ) ) ; for ( k = d [ 2 * ( H - 2 ) ] , l = d [ 2 * ( H - 2 ) + 1 ] , m = d [ 2 * ( H - 1 ) ] , n = d [ 2 * ( H - 1 ) + 1 ] , q = - ( l - n ) , r = k - m , E = Math . sqrt ( q * q + r * r ) , q /= E , r /= E , q *= K , r *= K , F . push ( m - q , n - r ) , F . push ( N , O , P , M ) , F . push ( m + q , n + r ) , F . push ( N , O , P , M ) , G . push ( J ) , c = 0 ; I > c ; c ++ ) G . push ( J ++ ) ; G . push ( J - 1 ) } } , PIXI . WebGLGraphics . buildComplexPoly = function ( a , b ) { var c = a . points . slice ( ) ; if ( ! ( c . length < 6 ) ) { var d = b . indices ; b . points = c , b . alpha = a . fillAlpha , b . color = PIXI . hex2rgb ( a . fillColor ) ; for ( var e , f , g = 1 / 0 , h = - ( 1 / 0 ) , i = 1 / 0 , j = - ( 1 / 0 ) , k = 0 ; k < c . length ; k += 2 ) e = c [ k ] , f = c [ k + 1 ] , g = g > e ? e : g , h = e > h ? e : h , i = i > f ? f : i , j = f > j ? f : j ; c . push ( g , i , h , i , h , j , g , j ) ; var l = c . length / 2 ; for ( k = 0 ; l > k ; k ++ ) d . push ( k ) } } , PIXI . WebGLGraphics . buildPoly = function ( a , b ) { var c = a . points ; if ( ! ( c . length < 6 ) ) { var d = b . points , e = b . indices , f = c . length / 2 , g = PIXI . hex2rgb ( a . fillColor ) , h = a . fillAlpha , i = g [ 0 ] * h , j = g [ 1 ] * h , k = g [ 2 ] * h , l = PIXI . EarCut . Triangulate ( c , null , 2 ) ; if ( ! l ) return ! 1 ; var m = d . length / 6 , n = 0 ; for ( n = 0 ; n < l . length ; n += 3 ) e . push ( l [ n ] + m ) , e . push ( l [ n ] + m ) , e . push ( l [ n + 1 ] + m ) , e . push ( l [ n + 2 ] + m ) , e . push ( l [ n + 2 ] + m ) ; for ( n = 0 ; f > n ; n ++ ) d . push ( c [ 2 * n ] , c [ 2 * n + 1 ] , i , j , k , h ) ; return ! 0 } } , PIXI . WebGLGraphics . graphicsDataPool = [ ] , PIXI . WebGLGraphicsData = function ( a ) { this . gl = a , this . color = [ 0 , 0 , 0 ] , this . points = [ ] , this . indices = [ ] , this . buffer = a . createBuffer ( ) , this . indexBuffer = a . createBuffer ( ) , this . mode = 1 , this . alpha = 1 , this . dirty = ! 0 } , PIXI . WebGLGraphicsData . prototype . reset = function ( ) { this . points = [ ] , this . indices = [ ] } , PIXI . WebGLGraphicsData . prototype . upload = function ( ) { var a = this . gl ; this . glPoints = new PIXI . Float32Array ( this . points ) , a . bindBuffer ( a . ARRAY _BUFFER , this . buffer ) , a . bufferData ( a . ARRAY _BUFFER , this . glPoints , a . STATIC _DRAW ) , this . glIndicies = new PIXI . Uint16Array ( this . indices ) , a . bindBuffer ( a . ELEMENT _ARRAY _BUFFER , this . indexBuffer ) , a . bufferData ( a . ELEMENT _ARRAY _BUFFER , this . glIndicies , a . STATIC _DRAW ) , this . dirty = ! 1 } , PIXI . CanvasGraphics = function ( ) { } , PIXI . CanvasGraphics . renderGraphics = function ( a , b ) { var c = a . worldAlpha ; a . dirty && ( this . updateGraphicsTint ( a ) , a . dirty = ! 1 ) ; for ( var d = 0 ; d < a . graphicsData . length ; d ++ ) { var e = a . graphicsData [ d ] , f = e . shape , g = e . _fillTint , h = e . _lineTint ; if ( b . lineWidth = e . lineWidth , e . type === PIXI . Graphics . POLY ) { b . beginPath ( ) ; var i = f . points ; b . moveTo ( i [ 0 ] , i [ 1 ] ) ; for ( var j = 1 ; j < i . length / 2 ; j ++ ) b . lineTo ( i [ 2 * j ] , i [ 2 * j + 1 ] ) ; f . closed && b . lineTo ( i [ 0 ] , i [ 1 ] ) , i [ 0 ] === i [ i . length - 2 ] && i [ 1 ] === i [ i . length - 1 ] && b . closePath ( ) , e . fill && ( b . globalAlpha = e . fillAlpha * c , b . fillStyle = "#" + ( "00000" + ( 0 | g ) . toString ( 16 ) ) . substr ( - 6 ) , b . fill ( ) ) , e . lineWidth && ( b . globalAlpha = e . lineAlpha * c , b . strokeStyle = "#" + ( "00000" + ( 0 | h ) . toString ( 16 ) ) . substr ( - 6 ) , b . stroke ( ) ) } else if ( e . type === PIXI . Graphics . RECT ) ( e . fillColor || 0 === e . fillColor ) && ( b .
} , c . BitmapText . prototype . updateText = function ( ) { var a = this . _data . font ; if ( a ) { var b = this . text , c = this . _fontSize / a . size , d = [ ] , e = 0 ; this . textWidth = 0 ; do { var f = this . scanLine ( a , c , b ) ; f . y = e , d . push ( f ) , f . width > this . textWidth && ( this . textWidth = f . width ) , e += a . lineHeight * c , b = b . substr ( f . text . length + 1 ) } while ( f . end === ! 1 ) ; this . textHeight = e ; for ( var g = 0 , h = 0 , i = this . textWidth * this . anchor . x , j = this . textHeight * this . anchor . y , k = 0 ; k < d . length ; k ++ ) { var f = d [ k ] ; "right" === this . _align ? h = this . textWidth - f . width : "center" === this . _align && ( h = ( this . textWidth - f . width ) / 2 ) ; for ( var l = 0 ; l < f . text . length ; l ++ ) { var m = f . text . charCodeAt ( l ) , n = a . chars [ m ] ; void 0 === n && ( m = 32 , n = a . chars [ m ] ) ; var o = this . _glyphs [ g ] ; o ? o . texture = n . texture : ( o = new PIXI . Sprite ( n . texture ) , o . name = f . text [ l ] , this . _glyphs . push ( o ) ) , o . position . x = f . chars [ l ] + h - i , o . position . y = f . y + n . yOffset * c - j , o . scale . set ( c ) , o . tint = this . tint , o . texture . requiresReTint = ! 0 , o . parent || this . addChild ( o ) , g ++ } } for ( k = g ; k < this . _glyphs . length ; k ++ ) this . removeChild ( this . _glyphs [ k ] ) } } , c . BitmapText . prototype . purgeGlyphs = function ( ) { for ( var a = this . _glyphs . length , b = [ ] , c = 0 ; c < this . _glyphs . length ; c ++ ) this . _glyphs [ c ] . parent !== this ? this . _glyphs [ c ] . destroy ( ) : b . push ( this . _glyphs [ c ] ) ; return this . _glyphs = [ ] , this . _glyphs = b , this . updateText ( ) , a - b . length } , c . BitmapText . prototype . updateTransform = function ( ) { ( this . dirty || ! this . anchor . equals ( this . _prevAnchor ) ) && ( this . updateText ( ) , this . dirty = ! 1 , this . _prevAnchor . copyFrom ( this . anchor ) ) , PIXI . DisplayObjectContainer . prototype . updateTransform . call ( this ) } , Object . defineProperty ( c . BitmapText . prototype , "align" , { get : function ( ) { return this . _align } , set : function ( a ) { a === this . _align || "left" !== a && "center" !== a && "right" !== a || ( this . _align = a , this . updateText ( ) ) } } ) , Object . defineProperty ( c . BitmapText . prototype , "tint" , { get : function ( ) { return this . _tint } , set : function ( a ) { a !== this . _tint && ( this . _tint = a , this . updateText ( ) ) } } ) , Object . defineProperty ( c . BitmapText . prototype , "font" , { get : function ( ) { return this . _font } , set : function ( a ) { a !== this . _font && ( this . _font = a . trim ( ) , this . _data = this . game . cache . getBitmapFont ( this . _font ) , this . updateText ( ) ) } } ) , Object . defineProperty ( c . BitmapText . prototype , "fontSize" , { get : function ( ) { return this . _fontSize } , set : function ( a ) { a = parseInt ( a , 10 ) , a !== this . _fontSize && a > 0 && ( this . _fontSize = a , this . updateText ( ) ) } } ) , Object . defineProperty ( c . BitmapText . prototype , "text" , { get : function ( ) { return this . _text } , set : function ( a ) { a !== this . _text && ( this . _text = a . toString ( ) || "" , this . updateText ( ) ) } } ) , Object . defineProperty ( c . BitmapText . prototype , "maxWidth" , { get : function ( ) { return this . _maxWidth } , set : function ( a ) { a !== this . _maxWidth && ( this . _maxWidth = a , this . updateText ( ) ) } } ) , Object . defineProperty ( c . BitmapText . prototype , "smoothed" , { get : function ( ) { return ! this . _data . base . scaleMode } , set : function ( a ) { a ? this . _data . base . scaleMode = 0 : this . _data . base . scaleMode = 1 } } ) , c . RetroFont = function ( a , b , d , e , f , g , h , i , j , k ) { if ( ! a . cache . checkImageKey ( b ) ) return ! 1 ; ( void 0 === g || null === g ) && ( g = a . cache . getImage ( b ) . width / d ) , this . characterWidth = d , this . characterHeight = e , this . characterSpacingX = h || 0 , this . characterSpacingY = i || 0 , this . characterPerRow = g , this . offsetX = j || 0 , this . offsetY = k || 0 , this . align = "left" , this . multiLine = ! 1 , this . autoUpperCase = ! 0 , this . customSpacingX = 0 , this . customSpacingY = 0 , this . fixedWidth = 0 , this . fontSet = a . cache . getImage ( b ) , this . _text = "" , this . grabData = [ ] , this . frameData = new c . FrameData ; for ( var l = this . offsetX , m = this . offsetY , n = 0 , o = 0 ; o < f . length ; o ++ ) { var p = this . frameData . addFrame ( new c . Frame ( o , l , m , this . characterWidth , this . characterHeight ) ) ; this . grabData [ f . charCodeAt ( o ) ] = p . index , n ++ , n === this . characterPerRow ? ( n = 0 , l = this . offsetX , m += this . characterHeight + this . characterSpacingY ) : l += this . characterWidth + this . characterSpacingX } a . cache . updateFrameData ( b , this . frameData ) , this . stamp = new c . Image ( a , 0 , 0 , b , 0 ) , c . RenderTexture . call ( this , a , 100 , 100 , "" , c . scaleModes . NEAREST ) , this . type = c . RETROFONT } , c . RetroFont . prototype = Object . create ( c . RenderTexture . prototype ) , c . RetroFont . prototype . constructor = c . RetroFont , c . RetroFont . ALIGN _LEFT = "left" , c . RetroFont . ALIGN _RIGHT = "right" , c . RetroFont . ALIGN _CENTER = "center" , c . RetroFont . TEXT _SET1 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" , c . Retro
this . maxObjects = 10 , this . maxLevels = 4 , this . level = 0 , this . bounds = { } , this . objects = [ ] , this . nodes = [ ] , this . _empty = [ ] , this . reset ( a , b , c , d , e , f , g ) } , c . QuadTree . prototype = { reset : function ( a , b , c , d , e , f , g ) { this . maxObjects = e || 10 , this . maxLevels = f || 4 , this . level = g || 0 , this . bounds = { x : Math . round ( a ) , y : Math . round ( b ) , width : c , height : d , subWidth : Math . floor ( c / 2 ) , subHeight : Math . floor ( d / 2 ) , right : Math . round ( a ) + Math . floor ( c / 2 ) , bottom : Math . round ( b ) + Math . floor ( d / 2 ) } , this . objects . length = 0 , this . nodes . length = 0 } , populate : function ( a ) { a . forEach ( this . populateHandler , this , ! 0 ) } , populateHandler : function ( a ) { a . body && a . exists && this . insert ( a . body ) } , split : function ( ) { this . nodes [ 0 ] = new c . QuadTree ( this . bounds . right , this . bounds . y , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , this . level + 1 ) , this . nodes [ 1 ] = new c . QuadTree ( this . bounds . x , this . bounds . y , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , this . level + 1 ) , this . nodes [ 2 ] = new c . QuadTree ( this . bounds . x , this . bounds . bottom , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , this . level + 1 ) , this . nodes [ 3 ] = new c . QuadTree ( this . bounds . right , this . bounds . bottom , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , this . level + 1 ) } , insert : function ( a ) { var b , c = 0 ; if ( null != this . nodes [ 0 ] && ( b = this . getIndex ( a ) , - 1 !== b ) ) return void this . nodes [ b ] . insert ( a ) ; if ( this . objects . push ( a ) , this . objects . length > this . maxObjects && this . level < this . maxLevels ) for ( null == this . nodes [ 0 ] && this . split ( ) ; c < this . objects . length ; ) b = this . getIndex ( this . objects [ c ] ) , - 1 !== b ? this . nodes [ b ] . insert ( this . objects . splice ( c , 1 ) [ 0 ] ) : c ++ } , getIndex : function ( a ) { var b = - 1 ; return a . x < this . bounds . right && a . right < this . bounds . right ? a . y < this . bounds . bottom && a . bottom < this . bounds . bottom ? b = 1 : a . y > this . bounds . bottom && ( b = 2 ) : a . x > this . bounds . right && ( a . y < this . bounds . bottom && a . bottom < this . bounds . bottom ? b = 0 : a . y > this . bounds . bottom && ( b = 3 ) ) , b } , retrieve : function ( a ) { if ( a instanceof c . Rectangle ) var b = this . objects , d = this . getIndex ( a ) ; else { if ( ! a . body ) return this . _empty ; var b = this . objects , d = this . getIndex ( a . body ) } return this . nodes [ 0 ] && ( - 1 !== d ? b = b . concat ( this . nodes [ d ] . retrieve ( a ) ) : ( b = b . concat ( this . nodes [ 0 ] . retrieve ( a ) ) , b = b . concat ( this . nodes [ 1 ] . retrieve ( a ) ) , b = b . concat ( this . nodes [ 2 ] . retrieve ( a ) ) , b = b . concat ( this . nodes [ 3 ] . retrieve ( a ) ) ) ) , b } , clear : function ( ) { this . objects . length = 0 ; for ( var a = this . nodes . length ; a -- ; ) this . nodes [ a ] . clear ( ) , this . nodes . splice ( a , 1 ) ; this . nodes . length = 0 } } , c . QuadTree . prototype . constructor = c . QuadTree , c . Net = function ( a ) { this . game = a } , c . Net . prototype = { getHostName : function ( ) { return window . location && window . location . hostname ? window . location . hostname : null } , checkDomainName : function ( a ) { return - 1 !== window . location . hostname . indexOf ( a ) } , updateQueryString : function ( a , b , c , d ) { void 0 === c && ( c = ! 1 ) , ( void 0 === d || "" === d ) && ( d = window . location . href ) ; var e = "" , f = new RegExp ( "([?|&])" + a + "=.*?(&|#|$)(.*)" , "gi" ) ; 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 ) { void 0 === 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 , " " ) ) } } , c . Net . prototype . constructor = c . Net , c . TweenManager = function ( a ) { this . game = a , this . frameBased = ! 1 , this . _tweens = [ ] , this . _add = [ ] , this . easeMap = { Power0 : c . Easing . Power0 , Power1 : c . Easing . Power1 , Power2 : c . Easing . Power2 , Power3 : c . Easing . Power3 , Power4 : c . Easing . Power4 , Linear : c . Easing . Linear . None , Quad : c . Easing . Quadratic . Out , Cubic : c . Easing . Cubic . Out , Quart : c . Easing . Quartic . Out , Quint : c . Easing . Quintic . Out , Sine : c . Easing . Sinusoidal . Out , Expo : c . Easing . Exponential . Out , Circ : c . Easing . Circular . Out , Elastic : c . Easing . Elastic . Out , Back : c . Easing . Back . Out , Bounce : c . Easing . Bounce . Out , "Quad.easeIn" : c . Easing . Quadratic . In , "Cubic.easeIn" : c . Easing . Cubic . In , " Quart . ea
this . _frameIndex = this . isReversed ? this . _frames . length - 1 : 0 , this . updateCurrentFrame ( ! 1 , ! 0 ) , this . _parent . events . onAnimationStart$dispatch ( this . _parent , this ) , this . onStart . dispatch ( this . _parent , this ) , this . _parent . animations . currentAnim = this , this . _parent . animations . currentFrame = this . currentFrame , this } , restart : function ( ) { this . isPlaying = ! 0 , this . isFinished = ! 1 , this . paused = ! 1 , this . loopCount = 0 , this . _timeLastFrame = this . game . time . time , this . _timeNextFrame = this . game . time . time + this . delay , this . _frameIndex = 0 , this . currentFrame = this . _frameData . getFrame ( this . _frames [ this . _frameIndex ] ) , this . _parent . setFrame ( this . currentFrame ) , this . _parent . animations . currentAnim = this , this . _parent . animations . currentFrame = this . currentFrame , this . onStart . dispatch ( this . _parent , this ) } , reverse : function ( ) { return this . reversed = ! this . reversed , this } , reverseOnce : function ( ) { return this . onComplete . addOnce ( this . reverse . bind ( this ) ) , this . reverse ( ) } , setFrame : function ( a , b ) { var c ; if ( void 0 === b && ( b = ! 1 ) , "string" == typeof a ) for ( var d = 0 ; d < this . _frames . length ; d ++ ) this . _frameData . getFrame ( this . _frames [ d ] ) . name === a && ( c = d ) ; else if ( "number" == typeof a ) if ( b ) c = a ; else for ( var d = 0 ; d < this . _frames . length ; d ++ ) this . _frames [ d ] === c && ( c = d ) ; c && ( this . _frameIndex = c - 1 , this . _timeNextFrame = this . game . time . time , this . update ( ) ) } , stop : function ( a , b ) { void 0 === a && ( a = ! 1 ) , void 0 === b && ( b = ! 1 ) , this . isPlaying = ! 1 , this . isFinished = ! 0 , this . paused = ! 1 , a && ( this . currentFrame = this . _frameData . getFrame ( this . _frames [ 0 ] ) , this . _parent . setFrame ( this . currentFrame ) ) , b && ( this . _parent . events . onAnimationComplete$dispatch ( this . _parent , this ) , this . onComplete . dispatch ( this . _parent , this ) ) } , onPause : function ( ) { this . isPlaying && ( this . _frameDiff = this . _timeNextFrame - this . game . time . time ) } , onResume : function ( ) { this . isPlaying && ( this . _timeNextFrame = this . game . time . time + this . _frameDiff ) } , update : function ( ) { return this . isPaused ? ! 1 : this . isPlaying && this . game . time . time >= this . _timeNextFrame ? ( this . _frameSkip = 1 , this . _frameDiff = this . game . time . time - this . _timeNextFrame , this . _timeLastFrame = this . game . time . time , this . _frameDiff > this . delay && ( this . _frameSkip = Math . floor ( this . _frameDiff / this . delay ) , this . _frameDiff -= this . _frameSkip * this . delay ) , this . _timeNextFrame = this . game . time . time + ( this . delay - this . _frameDiff ) , this . isReversed ? this . _frameIndex -= this . _frameSkip : this . _frameIndex += this . _frameSkip , ! this . isReversed && this . _frameIndex >= this . _frames . length || this . isReversed && this . _frameIndex <= - 1 ? this . loop ? ( this . _frameIndex = Math . abs ( this . _frameIndex ) % this . _frames . length , this . isReversed && ( this . _frameIndex = this . _frames . length - 1 - this . _frameIndex ) , this . currentFrame = this . _frameData . getFrame ( this . _frames [ this . _frameIndex ] ) , this . currentFrame && this . _parent . setFrame ( this . currentFrame ) , this . loopCount ++ , this . _parent . events . onAnimationLoop$dispatch ( this . _parent , this ) , this . onLoop . dispatch ( this . _parent , this ) , this . onUpdate ? ( this . onUpdate . dispatch ( this , this . currentFrame ) , ! ! this . _frameData ) : ! 0 ) : ( this . complete ( ) , ! 1 ) : this . updateCurrentFrame ( ! 0 ) ) : ! 1 } , updateCurrentFrame : function ( a , b ) { if ( void 0 === b && ( b = ! 1 ) , ! this . _frameData ) return ! 1 ; var c = this . currentFrame . index ; return this . currentFrame = this . _frameData . getFrame ( this . _frames [ this . _frameIndex ] ) , this . currentFrame && ( b || ! b && c !== this . currentFrame . index ) && this . _parent . setFrame ( this . currentFrame ) , this . onUpdate && a ? ( this . onUpdate . dispatch ( this , this . currentFrame ) , ! ! this . _frameData ) : ! 0 } , next : function ( a ) { void 0 === a && ( a = 1 ) ; var b = this . _frameIndex + a ; b >= this . _frames . length && ( this . loop ? b %= this . _frames . length : b = this . _frames . length - 1 ) , b !== this . _frameIndex && ( this . _frameIndex = b , this . updateCurrentFrame ( ! 0 ) ) } , previous : function ( a ) { void 0 === a && ( a = 1 ) ; var b = this . _frameIndex - a ; 0 > b && ( this . loop ? b = this . _frames . length + b : b ++ ) , b !== this . _frameIndex && ( this . _frameIndex = b , this . updateCurrentFrame ( ! 0 ) ) } , updateFrameData : function ( a ) { this . _frameData = a , this . currentFrame = this . _frameData ? this . _frameData . getFrame ( this . _frames [ this . _frameIndex % this . _frames . length ] ) : null } , destroy : function ( ) { this . _frameData && ( this . game . onPause . remove ( this . onPause , this ) , this . game . onResume . remove ( this . onResume , this ) , this . game = null , this . _parent = null , this . _frames = null , this . _frameData = null , this . currentFrame = null , this . isPlaying = ! 1 , th
if ( ! this . isLoading ) return console . warn ( "Phaser.Loader - active loading canceled / reset" ) , void this . finishedLoading ( ! 0 ) ; for ( var a = 0 ; a < this . _flightQueue . length ; a ++ ) { var b = this . _flightQueue [ a ] ; ( b . loaded || b . error ) && ( this . _flightQueue . splice ( a , 1 ) , a -- , b . loading = ! 1 , b . requestUrl = null , b . requestObject = null , b . error && this . onFileError . dispatch ( b . key , b ) , "packfile" !== b . type ? ( this . _loadedFileCount ++ , this . onFileComplete . dispatch ( this . progress , b . key , ! b . error , this . _loadedFileCount , this . _totalFileCount ) ) : "packfile" === b . type && b . error && ( this . _loadedPackCount ++ , this . onPackComplete . dispatch ( b . key , ! b . error , this . _loadedPackCount , this . _totalPackCount ) ) ) } for ( var d = ! 1 , e = this . enableParallel ? c . Math . clamp ( this . maxParallelDownloads , 1 , 12 ) : 1 , a = this . _processingHead ; a < this . _fileList . length ; a ++ ) { var b = this . _fileList [ a ] ; if ( "packfile" === b . type && ! b . error && b . loaded && a === this . _processingHead && ( this . processPack ( b ) , this . _loadedPackCount ++ , this . onPackComplete . dispatch ( b . key , ! b . error , this . _loadedPackCount , this . _totalPackCount ) ) , b . loaded || b . error ? a === this . _processingHead && ( this . _processingHead = a + 1 ) : ! b . loading && this . _flightQueue . length < e && ( "packfile" !== b . type || b . data ? d || ( this . _fileLoadStarted || ( this . _fileLoadStarted = ! 0 , this . onLoadStart . dispatch ( ) ) , this . _flightQueue . push ( b ) , b . loading = ! 0 , this . onFileStart . dispatch ( this . progress , b . key , b . url ) , this . loadFile ( b ) ) : ( this . _flightQueue . push ( b ) , b . loading = ! 0 , this . loadFile ( b ) ) ) , ! b . loaded && b . syncPoint && ( d = ! 0 ) , this . _flightQueue . length >= e || d && this . _loadedPackCount === this . _totalPackCount ) break } if ( this . updateProgress ( ) , this . _processingHead >= this . _fileList . length ) this . finishedLoading ( ) ; else if ( ! this . _flightQueue . length ) { console . warn ( "Phaser.Loader - aborting: processing queue empty, loading may have stalled" ) ; var f = this ; setTimeout ( function ( ) { f . finishedLoading ( ! 0 ) } , 2e3 ) } } , finishedLoading : function ( a ) { this . hasLoaded || ( this . hasLoaded = ! 0 , this . isLoading = ! 1 , a || this . _fileLoadStarted || ( this . _fileLoadStarted = ! 0 , this . onLoadStart . dispatch ( ) ) , this . onLoadComplete . dispatch ( ) , this . game . state . loadComplete ( ) , this . reset ( ) ) } , asyncComplete : function ( a , b ) { void 0 === b && ( b = "" ) , a . loaded = ! 0 , a . error = ! ! b , b && ( a . errorMessage = b , console . warn ( "Phaser.Loader - " + a . type + "[" + a . key + "]: " + b ) ) , this . processLoadQueue ( ) } , processPack : function ( a ) { var b = a . data [ a . key ] ; if ( ! b ) return void console . warn ( "Phaser.Loader - " + a . key + ": pack has data, but not for pack key" ) ; for ( var d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; switch ( e . type ) { case "image" : this . image ( e . key , e . url , e . overwrite ) ; break ; case "text" : this . text ( e . key , e . url , e . overwrite ) ; break ; case "json" : this . json ( e . key , e . url , e . overwrite ) ; break ; case "xml" : this . xml ( e . key , e . url , e . overwrite ) ; break ; case "script" : this . script ( e . key , e . url , e . callback , a . callbackContext || this ) ; break ; case "binary" : this . binary ( e . key , e . url , e . callback , a . callbackContext || this ) ; break ; case "spritesheet" : this . spritesheet ( e . key , e . url , e . frameWidth , e . frameHeight , e . frameMax , e . margin , e . spacing ) ; break ; case "video" : this . video ( e . key , e . urls ) ; break ; case "audio" : this . audio ( e . key , e . urls , e . autoDecode ) ; break ; case "audiosprite" : this . audiosprite ( e . key , e . urls , e . jsonURL , e . jsonData , e . autoDecode ) ; break ; case "tilemap" : this . tilemap ( e . key , e . url , e . data , c . Tilemap [ e . format ] ) ; break ; case "physics" : this . physics ( e . key , e . url , e . data , c . Loader [ e . format ] ) ; break ; case "bitmapFont" : this . bitmapFont ( e . key , e . textureURL , e . atlasURL , e . atlasData , e . xSpacing , e . ySpacing ) ; break ; case "atlasJSONArray" : this . atlasJSONArray ( e . key , e . textureURL , e . atlasURL , e . atlasData ) ; break ; case "atlasJSONHash" : this . atlasJSONHash ( e . key , e . textureURL , e . atlasURL , e . atlasData ) ; break ; case "atlasXML" : this . atlasXML ( e . key , e . textureURL , e . atlasURL , e . atlasData ) ; break ; case "atlas" : this . atlas ( e . key , e . textureURL , e . atlasURL , e . atlasData , c . Loader [ e . format ] ) ; break ; case "shader" : this . shader ( e . key , e . url , e . overwrite ) } } } , transformUrl : function ( a , b ) { return a ? a . match ( /^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/ ) ? a : this . baseURL + b . path + a : ! 1 } , loadFile : function ( a ) { switch ( a . type ) { case "packfile" : this . xhrLoad ( a , this . transformUrl ( a . url , a ) , "text" , this . fileComplete ) ; break ; case "image" : case "spritesheet" : case "textureatlas" : case "bitmapfont" : this . loadImageTag ( a ) ; break ; case "audio" : a . url = this . getAudioURL ( a . url ) , a . url ? thi
get : function ( ) { return this . _muted } , set : function ( a ) { if ( a = a || ! 1 ) { if ( this . _muted ) return ; this . _codeMuted = ! 0 , this . setMute ( ) } else { if ( ! this . _muted ) return ; this . _codeMuted = ! 1 , this . unsetMute ( ) } } } ) , Object . defineProperty ( c . SoundManager . prototype , "volume" , { get : function ( ) { return this . _volume } , set : function ( a ) { if ( 0 > a ? a = 0 : a > 1 && ( a = 1 ) , this . _volume !== 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 ] . updateGlobalVolume ( a ) ; this . onVolumeChange . dispatch ( a ) } } } ) , c . ScaleManager = function ( a , b , d ) { this . game = a , this . dom = c . DOM , this . grid = null , this . width = 0 , this . height = 0 , this . minWidth = null , this . maxWidth = null , this . minHeight = null , this . maxHeight = null , this . offset = new c . Point , this . forceLandscape = ! 1 , this . forcePortrait = ! 1 , this . incorrectOrientation = ! 1 , this . _pageAlignHorizontally = ! 1 , this . _pageAlignVertically = ! 1 , this . onOrientationChange = new c . Signal , this . enterIncorrectOrientation = new c . Signal , this . leaveIncorrectOrientation = new c . Signal , this . fullScreenTarget = null , this . _createdFullScreenTarget = null , this . onFullScreenInit = new c . Signal , this . onFullScreenChange = new c . Signal , this . onFullScreenError = new c . Signal , this . screenOrientation = this . dom . getScreenOrientation ( ) , this . scaleFactor = new c . Point ( 1 , 1 ) , this . scaleFactorInversed = new c . Point ( 1 , 1 ) , this . margin = { left : 0 , top : 0 , right : 0 , bottom : 0 , x : 0 , y : 0 } , this . bounds = new c . Rectangle , this . aspectRatio = 0 , this . sourceAspectRatio = 0 , this . event = null , this . windowConstraints = { right : "layout" , bottom : "" } , this . compatibility = { supportsFullScreen : ! 1 , orientationFallback : null , noMargins : ! 1 , scrollTo : null , forceMinimumDocumentHeight : ! 1 , canExpandParent : ! 0 , clickTrampoline : "" } , this . _scaleMode = c . ScaleManager . NO _SCALE , this . _fullScreenScaleMode = c . ScaleManager . NO _SCALE , this . parentIsWindow = ! 1 , this . parentNode = null , this . parentScaleFactor = new c . Point ( 1 , 1 ) , this . trackParentInterval = 2e3 , this . onSizeChange = new c . Signal , this . onResize = null , this . onResizeContext = null , this . _pendingScaleMode = null , this . _fullScreenRestore = null , this . _gameSize = new c . Rectangle , this . _userScaleFactor = new c . Point ( 1 , 1 ) , this . _userScaleTrim = new c . Point ( 0 , 0 ) , this . _lastUpdate = 0 , this . _updateThrottle = 0 , this . _updateThrottleReset = 100 , this . _parentBounds = new c . Rectangle , this . _tempBounds = new c . Rectangle , this . _lastReportedCanvasSize = new c . Rectangle , this . _lastReportedGameSize = new c . Rectangle , this . _booted = ! 1 , a . config && this . parseConfig ( a . config ) , this . setupScale ( b , d ) } , c . ScaleManager . EXACT _FIT = 0 , c . ScaleManager . NO _SCALE = 1 , c . ScaleManager . SHOW _ALL = 2 , c . ScaleManager . RESIZE = 3 , c . ScaleManager . USER _SCALE = 4 , c . ScaleManager . prototype = { boot : function ( ) { var a = this . compatibility ; a . supportsFullScreen = this . game . device . fullscreen && ! this . game . device . cocoonJS , this . game . device . iPad || this . game . device . webApp || this . game . device . desktop || ( this . game . device . android && ! this . game . device . chrome ? a . scrollTo = new c . Point ( 0 , 1 ) : a . scrollTo = new c . Point ( 0 , 0 ) ) , this . game . device . desktop ? ( a . orientationFallback = "screen" , a . clickTrampoline = "when-not-mouse" ) : ( a . orientationFallback = "" , a . clickTrampoline = "" ) ; var b = this ; this . _orientationChange = function ( a ) { return b . orientationChange ( a ) } , this . _windowResize = function ( a ) { return b . windowResize ( a ) } , window . addEventListener ( "orientationchange" , this . _orientationChange , ! 1 ) , window . addEventListener ( "resize" , this . _windowResize , ! 1 ) , this . compatibility . supportsFullScreen && ( this . _fullScreenChange = function ( a ) { return b . fullScreenChange ( a ) } , this . _fullScreenError = function ( a ) { return b . fullScreenError ( a ) } , document . addEventListener ( "webkitfullscreenchange" , this . _fullScreenChange , ! 1 ) , document . addEventListener ( "mozfullscreenchange" , this . _fullScreenChange , ! 1 ) , document . addEventListener ( "MSFullscreenChange" , this . _fullScreenChange , ! 1 ) , document . addEventListener ( "fullscreenchange" , this . _fullScreenChange , ! 1 ) , document . addEventListener ( "webkitfullscreenerror" , this . _fullScreenError , ! 1 ) , document . addEventListener ( "mozfullscreenerror" , this . _fullScreenError , ! 1 ) , document . addEventListener ( "MSFullscreenError" , this . _fullScreenError , ! 1 ) , document . addEventListener ( "fullscreenerror" , this . _fullScreenError , ! 1 ) ) , this . game . onResume . add ( this . _gameResumed , this ) , this . dom . getOff
get : f } ) , Object . defineProperty ( c . DOM . visualBounds , "height" , { get : g } ) , Object . defineProperty ( c . DOM . layoutBounds , "width" , { get : f } ) , Object . defineProperty ( c . DOM . layoutBounds , "height" , { get : g } ) } else Object . defineProperty ( c . DOM . visualBounds , "width" , { get : function ( ) { return window . innerWidth } } ) , Object . defineProperty ( c . DOM . visualBounds , "height" , { get : function ( ) { return window . innerHeight } } ) , Object . defineProperty ( c . DOM . layoutBounds , "width" , { get : function ( ) { var a = document . documentElement . clientWidth , b = window . innerWidth ; return b > a ? b : a } } ) , Object . defineProperty ( c . DOM . layoutBounds , "height" , { get : function ( ) { var a = document . documentElement . clientHeight , b = window . innerHeight ; return b > a ? b : a } } ) ; Object . defineProperty ( c . DOM . documentBounds , "x" , { value : 0 } ) , Object . defineProperty ( c . DOM . documentBounds , "y" , { value : 0 } ) , Object . defineProperty ( c . DOM . documentBounds , "width" , { get : function ( ) { var a = document . documentElement ; return Math . max ( a . clientWidth , a . offsetWidth , a . scrollWidth ) } } ) , Object . defineProperty ( c . DOM . documentBounds , "height" , { get : function ( ) { var a = document . documentElement ; return Math . max ( a . clientHeight , a . offsetHeight , a . scrollHeight ) } } ) } , null , ! 0 ) , c . ArraySet = function ( a ) { this . position = 0 , this . list = a || [ ] } , c . ArraySet . prototype = { add : function ( a ) { return this . exists ( a ) || this . list . push ( a ) , a } , getIndex : function ( a ) { return this . list . indexOf ( a ) } , getByKey : function ( a , b ) { for ( var c = this . list . length ; c -- ; ) if ( this . list [ c ] [ a ] === b ) return this . list [ c ] ; return null } , exists : function ( a ) { return this . list . indexOf ( a ) > - 1 } , reset : function ( ) { this . list . length = 0 } , remove : function ( a ) { var b = this . list . indexOf ( a ) ; return b > - 1 ? ( this . list . splice ( b , 1 ) , a ) : void 0 } , setAll : function ( a , b ) { for ( var c = this . list . length ; c -- ; ) this . list [ c ] && ( this . list [ c ] [ a ] = b ) } , callAll : function ( a ) { for ( var b = Array . prototype . slice . call ( arguments , 1 ) , c = this . list . length ; c -- ; ) this . list [ c ] && this . list [ c ] [ a ] && this . list [ c ] [ a ] . apply ( this . list [ c ] , b ) } , removeAll : function ( a ) { void 0 === a && ( a = ! 1 ) ; for ( var b = this . list . length ; b -- ; ) if ( this . list [ b ] ) { var c = this . remove ( this . list [ b ] ) ; a && c . destroy ( ) } this . position = 0 , this . list = [ ] } } , Object . defineProperty ( c . ArraySet . prototype , "total" , { get : function ( ) { return this . list . length } } ) , Object . defineProperty ( c . ArraySet . prototype , "first" , { get : function ( ) { return this . position = 0 , this . list . length > 0 ? this . list [ 0 ] : null } } ) , Object . defineProperty ( c . ArraySet . prototype , "next" , { get : function ( ) { return this . position < this . list . length ? ( this . position ++ , this . list [ this . position ] ) : null } } ) , c . ArraySet . prototype . constructor = c . ArraySet , c . ArrayUtils = { getRandomItem : function ( a , b , c ) { if ( null === a ) return null ; void 0 === b && ( b = 0 ) , void 0 === c && ( c = a . length ) ; var d = b + Math . floor ( Math . random ( ) * c ) ; return void 0 === a [ d ] ? null : a [ d ] } , removeRandomItem : function ( a , b , c ) { if ( null == a ) return null ; void 0 === b && ( b = 0 ) , void 0 === c && ( c = a . length ) ; var d = b + Math . floor ( Math . random ( ) * c ) ; if ( d < a . length ) { var e = a . splice ( d , 1 ) ; return void 0 === e [ 0 ] ? null : e [ 0 ] } return null } , shuffle : function ( a ) { for ( var b = a . length - 1 ; b > 0 ; b -- ) { var c = Math . floor ( Math . random ( ) * ( b + 1 ) ) , d = a [ b ] ; a [ b ] = a [ c ] , a [ c ] = d } return a } , transposeMatrix : function ( a ) { for ( var b = a . length , c = a [ 0 ] . length , d = new Array ( c ) , e = 0 ; c > e ; e ++ ) { d [ e ] = new Array ( b ) ; for ( var f = b - 1 ; f > - 1 ; f -- ) d [ e ] [ f ] = a [ f ] [ e ] } return d } , rotateMatrix : function ( a , b ) { if ( "string" != typeof b && ( b = ( b % 360 + 360 ) % 360 ) , 90 === b || - 270 === b || "rotateLeft" === b ) a = c . ArrayUtils . transposeMatrix ( a ) , a = a . reverse ( ) ; else if ( - 90 === b || 270 === b || "rotateRight" === b ) a = a . reverse ( ) , a = c . ArrayUtils . transposeMatrix ( a ) ; else if ( 180 === Math . abs ( b ) || "rotate180" === b ) { for ( var d = 0 ; d < a . length ; d ++ ) a [ d ] . reverse ( ) ; a = a . reverse ( ) } return a } , findClosest : function ( a , b ) { if ( ! b . length ) return NaN ; if ( 1 === b . length || a < b [ 0 ] ) return b [ 0 ] ; for ( var c = 1 ; b [ c ] < a ; ) c ++ ; var d = b [ c - 1 ] , e = c < b . length ? b [ c ] : Number . POSITIVE _INFINITY ; return a - d >= e - a ? e : d } , rotate : function ( a ) { var b = a . shift ( ) ; return a . push ( b ) , b } , numberArray : function ( a , b ) { for ( var c = [ ] , d = a ; b >= d ; d ++ ) c . push ( d ) ; return c } , numberArrayStep : function ( a , b , d ) { ( void 0 === a || null === a ) && ( a = 0 ) , ( void 0 === b || null === b ) && ( b = a , a = 0 ) , void 0 === d && ( d = 1 ) ; for ( var e = [ ] , f = Math . max ( c . Math . roundAwayFromZero ( ( b - a ) / ( d || 1 ) ) , 0 ) , g = 0 ; f > g ; g ++ ) e . push ( a ) , a += d ; return e } } , c . LinkedList = function ( ) { this . next = null , this . prev = null , this . first = null , this . last = null , this . tot
void 0 === c && ( c = 60 ) , void 0 === d && ( d = 0 ) ; var e = Math . atan2 ( b . y - a . y , b . x - a . x ) ; return d > 0 && ( c = this . distanceBetween ( a , b ) / ( d / 1e3 ) ) , a . body . velocity . x = Math . cos ( e ) * c , a . body . velocity . y = Math . sin ( e ) * c , e } , moveToPointer : function ( a , b , c , d ) { void 0 === b && ( b = 60 ) , c = c || this . game . input . activePointer , void 0 === d && ( d = 0 ) ; var e = this . angleToPointer ( a , c ) ; return d > 0 && ( b = this . distanceToPointer ( a , c ) / ( d / 1e3 ) ) , a . body . velocity . x = Math . cos ( e ) * b , a . body . velocity . y = Math . sin ( e ) * b , e } , moveToXY : function ( a , b , c , d , e ) { void 0 === d && ( d = 60 ) , void 0 === e && ( e = 0 ) ; var f = Math . atan2 ( c - a . y , b - a . x ) ; return e > 0 && ( d = this . distanceToXY ( a , b , c ) / ( e / 1e3 ) ) , a . body . velocity . x = Math . cos ( f ) * d , a . body . velocity . y = Math . sin ( f ) * d , f } , velocityFromAngle : function ( a , b , d ) { return void 0 === b && ( b = 60 ) , d = d || new c . Point , d . setTo ( Math . cos ( this . game . math . degToRad ( a ) ) * b , Math . sin ( this . game . math . degToRad ( a ) ) * b ) } , velocityFromRotation : function ( a , b , d ) { return void 0 === b && ( b = 60 ) , d = d || new c . Point , d . setTo ( Math . cos ( a ) * b , Math . sin ( a ) * b ) } , accelerationFromRotation : function ( a , b , d ) { return void 0 === b && ( b = 60 ) , d = d || new c . Point , d . setTo ( Math . cos ( a ) * b , Math . sin ( a ) * b ) } , accelerateToObject : function ( a , b , c , d , e ) { void 0 === c && ( c = 60 ) , void 0 === d && ( d = 1e3 ) , void 0 === e && ( e = 1e3 ) ; var f = this . angleBetween ( a , b ) ; return a . body . acceleration . setTo ( Math . cos ( f ) * c , Math . sin ( f ) * c ) , a . body . maxVelocity . setTo ( d , e ) , f } , accelerateToPointer : function ( a , b , c , d , e ) { void 0 === c && ( c = 60 ) , void 0 === b && ( b = this . game . input . activePointer ) , void 0 === d && ( d = 1e3 ) , void 0 === e && ( e = 1e3 ) ; var f = this . angleToPointer ( a , b ) ; return a . body . acceleration . setTo ( Math . cos ( f ) * c , Math . sin ( f ) * c ) , a . body . maxVelocity . setTo ( d , e ) , f } , accelerateToXY : function ( a , b , c , d , e , f ) { void 0 === d && ( d = 60 ) , void 0 === e && ( e = 1e3 ) , void 0 === f && ( f = 1e3 ) ; var g = this . angleToXY ( a , b , c ) ; return a . body . acceleration . setTo ( Math . cos ( g ) * d , Math . sin ( g ) * d ) , a . body . maxVelocity . setTo ( e , f ) , g } , distanceBetween : function ( a , b , c ) { void 0 === c && ( c = ! 1 ) ; var d = c ? a . world . x - b . world . x : a . x - b . x , e = c ? a . world . y - b . world . y : a . y - b . y ; return Math . sqrt ( d * d + e * e ) } , distanceToXY : function ( a , b , c , d ) { void 0 === d && ( d = ! 1 ) ; var e = d ? a . world . x - b : a . x - b , f = d ? a . world . y - c : a . y - c ; return Math . sqrt ( e * e + f * f ) } , distanceToPointer : function ( a , b , c ) { void 0 === b && ( b = this . game . input . activePointer ) , void 0 === c && ( c = ! 1 ) ; var d = c ? a . world . x - b . worldX : a . x - b . worldX , e = c ? a . world . y - b . worldY : a . y - b . worldY ; return Math . sqrt ( d * d + e * e ) } , angleBetween : function ( a , b , c ) { return void 0 === c && ( c = ! 1 ) , c ? Math . atan2 ( b . world . y - a . world . y , b . world . x - a . world . x ) : Math . atan2 ( b . y - a . y , b . x - a . x ) } , angleToXY : function ( a , b , c , d ) { return void 0 === d && ( d = ! 1 ) , d ? Math . atan2 ( c - a . world . y , b - a . world . x ) : Math . atan2 ( c - a . y , b - a . x ) } , angleToPointer : function ( a , b , c ) { return void 0 === b && ( b = this . game . input . activePointer ) , void 0 === c && ( c = ! 1 ) , c ? Math . atan2 ( b . worldY - a . world . y , b . worldX - a . world . x ) : Math . atan2 ( b . worldY - a . y , b . worldX - a . x ) } , worldAngleToPointer : function ( a , b ) { return this . angleToPointer ( a , b , ! 0 ) } } , c . Physics . Arcade . Body = function ( a ) { this . sprite = a , this . game = a . game , this . type = c . Physics . ARCADE , this . enable = ! 0 , this . offset = new c . Point , this . position = new c . Point ( a . x , a . y ) , this . prev = new c . Point ( this . position . x , this . position . y ) , this . allowRotation = ! 0 , this . rotation = a . rotation , this . preRotation = a . rotation , this . width = a . width , this . height = a . height , this . sourceWidth = a . width , this . sourceHeight = a . height , a . texture && ( this . sourceWidth = a . texture . frame . width , this . sourceHeight = a . texture . frame . height ) , this . halfWidth = Math . abs ( a . width / 2 ) , this . halfHeight = Math . abs ( a . height / 2 ) , this . center = new c . Point ( a . x + this . halfWidth , a . y + this . halfHeight ) , this . velocity = new c . Point , this . newVelocity = new c . Point ( 0 , 0 ) , this . deltaMax = new c . Point ( 0 , 0 ) , this . acceleration = new c . Point , this . drag = new c . Point , this . allowGravity = ! 0 , this . gravity = new c . Point ( 0 , 0 ) , this . bounce = new c . Point , this . worldBounce = null , this . maxVelocity = new c . Point ( 1e4 , 1e4 ) , this . friction = new c . Point ( 1 , 0 ) , this . angularVelocity = 0 , this . angularAcceleration = 0 , this . angularDrag = 0 , this . maxAngular = 1e3 , this . mass = 1 , this . angle = 0 , this . speed = 0 , this . facing = c . NONE , this . immovable = ! 1 , this . moves = ! 0 , this . customSeparateX = ! 1 , this . customSeparateY = ! 1 , this . overlapX = 0 , this . overlapY = 0 , this . embedded = ! 1 , this . collideWorldBounds = ! 1 , this . checkCollision = { none : ! 1 , any : ! 0 , up : ! 0 , down : ! 0 , left : ! 0 , right : ! 0 } , this . touching = { none : ! 0 , up : ! 1 , down : !
this . world . applyDamping = a } } ) , Object . defineProperty ( c . Physics . P2 . prototype , "applyGravity" , { get : function ( ) { return this . world . applyGravity } , set : function ( a ) { this . world . applyGravity = a } } ) , Object . defineProperty ( c . Physics . P2 . prototype , "solveConstraints" , { get : function ( ) { return this . world . solveConstraints } , set : function ( a ) { this . world . solveConstraints = a } } ) , Object . defineProperty ( c . Physics . P2 . prototype , "time" , { get : function ( ) { return this . world . time } } ) , Object . defineProperty ( c . Physics . P2 . prototype , "emitImpactEvent" , { get : function ( ) { return this . world . emitImpactEvent } , set : function ( a ) { this . world . emitImpactEvent = a } } ) , Object . defineProperty ( c . Physics . P2 . prototype , "sleepMode" , { get : function ( ) { return this . world . sleepMode } , set : function ( a ) { this . world . sleepMode = a } } ) , Object . defineProperty ( c . Physics . P2 . prototype , "total" , { get : function ( ) { return this . world . bodies . length } } ) , c . Physics . P2 . FixtureList = function ( a ) { Array . isArray ( a ) || ( a = [ a ] ) , this . rawList = a , this . init ( ) , this . parse ( this . rawList ) } , c . Physics . P2 . FixtureList . prototype = { init : function ( ) { this . namedFixtures = { } , this . groupedFixtures = [ ] , this . allFixtures = [ ] } , setCategory : function ( a , b ) { var c = function ( b ) { b . collisionGroup = a } ; this . getFixtures ( b ) . forEach ( c ) } , setMask : function ( a , b ) { var c = function ( b ) { b . collisionMask = a } ; this . getFixtures ( b ) . forEach ( c ) } , setSensor : function ( a , b ) { var c = function ( b ) { b . sensor = a } ; this . getFixtures ( b ) . forEach ( c ) } , setMaterial : function ( a , b ) { var c = function ( b ) { b . material = a } ; this . getFixtures ( b ) . forEach ( c ) } , getFixtures : function ( a ) { var b = [ ] ; if ( a ) { a instanceof Array || ( a = [ a ] ) ; var c = this ; return a . forEach ( function ( a ) { c . namedFixtures [ a ] && b . push ( c . namedFixtures [ a ] ) } ) , this . flatten ( b ) } return this . allFixtures } , getFixtureByKey : function ( a ) { return this . namedFixtures [ a ] } , getGroup : function ( a ) { return this . groupedFixtures [ a ] } , parse : function ( ) { var a , b , c , d ; c = this . rawList , d = [ ] ; for ( a in c ) b = c [ a ] , isNaN ( a - 0 ) ? this . namedFixtures [ a ] = this . flatten ( b ) : ( this . groupedFixtures [ a ] = this . groupedFixtures [ a ] || [ ] , this . groupedFixtures [ a ] = this . groupedFixtures [ a ] . concat ( b ) ) , d . push ( this . allFixtures = this . flatten ( this . groupedFixtures ) ) } , flatten : function ( a ) { var b , c ; return b = [ ] , c = arguments . callee , a . forEach ( function ( a ) { return Array . prototype . push . apply ( b , Array . isArray ( a ) ? c ( a ) : [ a ] ) } ) , b } } , c . Physics . P2 . PointProxy = function ( a , b ) { this . world = a , this . destination = b } , c . Physics . P2 . PointProxy . prototype . constructor = c . Physics . P2 . PointProxy , Object . defineProperty ( c . Physics . P2 . PointProxy . prototype , "x" , { get : function ( ) { return this . world . mpx ( this . destination [ 0 ] ) } , set : function ( a ) { this . destination [ 0 ] = this . world . pxm ( a ) } } ) , Object . defineProperty ( c . Physics . P2 . PointProxy . prototype , "y" , { get : function ( ) { return this . world . mpx ( this . destination [ 1 ] ) } , set : function ( a ) { this . destination [ 1 ] = this . world . pxm ( a ) } } ) , Object . defineProperty ( c . Physics . P2 . PointProxy . prototype , "mx" , { get : function ( ) { return this . destination [ 0 ] } , set : function ( a ) { this . destination [ 0 ] = a } } ) , Object . defineProperty ( c . Physics . P2 . PointProxy . prototype , "my" , { get : function ( ) { return this . destination [ 1 ] } , set : function ( a ) { this . destination [ 1 ] = a } } ) , c . Physics . P2 . InversePointProxy = function ( a , b ) { this . world = a , this . destination = b } , c . Physics . P2 . InversePointProxy . prototype . constructor = c . Physics . P2 . InversePointProxy , Object . defineProperty ( c . Physics . P2 . InversePointProxy . prototype , "x" , { get : function ( ) { return this . world . mpxi ( this . destination [ 0 ] ) } , set : function ( a ) { this . destination [ 0 ] = this . world . pxmi ( a ) } } ) , Object . defineProperty ( c . Physics . P2 . InversePointProxy . prototype , "y" , { get : function ( ) { return this . world . mpxi ( this . destination [ 1 ] ) } , set : function ( a ) { this . destination [ 1 ] = this . world . pxmi ( a ) } } ) , Object . defineProperty ( c . Physics . P2 . InversePointProxy . prototype , "mx" , { get : function ( ) { return this . destination [ 0 ] } , set : function ( a ) { this . destination [ 0 ] = - a } } ) , Object . defineProperty ( c . Physics . P2 . InversePointProxy . prototype , "my" , { get : function ( ) { return this . destination [ 1 ] } , set : function ( a ) { this . destination [ 1 ] = - a } } ) , c . Physics . P2 . Body = function ( a , b , d , e , f ) { b = b || null , d = d || 0 , e = e || 0 , void 0 === f && ( f = 1 ) , this . game = a , this . world = a . physics . p2 , this . sprite = b , this . type = c . Physics . P2JS , this . offset = new c . Point , this . data = new p2 . Body ( { position : [ this . world . pxmi ( d ) , this . world . pxmi ( e ) ] , mass : f } ) , this . data .
null ; if ( this . tilesets [ j ] ) return this . tilesets [ j ] . setImage ( i ) , this . tilesets [ j ] ; var k = new c . Tileset ( a , h , d , e , f , g , { } ) ; k . setImage ( i ) , this . tilesets . push ( k ) ; for ( var l = this . tilesets . length - 1 , m = f , n = f , o = 0 , p = 0 , q = 0 , r = h ; r < h + k . total && ( this . tiles [ r ] = [ m , n , l ] , m += d + g , o ++ , o !== k . total ) && ( p ++ , p !== k . columns || ( m = f , n += e + g , p = 0 , q ++ , q !== k . rows ) ) ; r ++ ) ; return k } , createFromObjects : function ( a , b , d , e , f , g , h , i , j ) { if ( void 0 === f && ( f = ! 0 ) , void 0 === g && ( g = ! 1 ) , void 0 === h && ( h = this . game . world ) , void 0 === i && ( i = c . Sprite ) , void 0 === j && ( j = ! 0 ) , ! this . objects [ a ] ) return void console . warn ( "Tilemap.createFromObjects: Invalid objectgroup name given: " + a ) ; for ( var k = 0 ; k < this . objects [ a ] . length ; k ++ ) { var l = ! 1 , m = this . objects [ a ] [ k ] ; if ( void 0 !== m . gid && "number" == typeof b && m . gid === b ? l = ! 0 : void 0 !== m . id && "number" == typeof b && m . id === b ? l = ! 0 : void 0 !== m . name && "string" == typeof b && m . name === b && ( l = ! 0 ) , l ) { var n = new i ( this . game , parseFloat ( m . x , 10 ) , parseFloat ( m . y , 10 ) , d , e ) ; n . name = m . name , n . visible = m . visible , n . autoCull = g , n . exists = f , m . width && ( n . width = m . width ) , m . height && ( n . height = m . height ) , m . rotation && ( n . angle = m . rotation ) , j && ( n . y -= n . height ) , h . add ( n ) ; for ( var o in m . properties ) h . set ( n , o , m . properties [ o ] , ! 1 , ! 1 , 0 , ! 0 ) } } } , createFromTiles : function ( a , b , d , e , f , g ) { "number" == typeof a && ( a = [ a ] ) , void 0 === b || null === b ? b = [ ] : "number" == typeof b && ( b = [ b ] ) , e = this . getLayer ( e ) , void 0 === f && ( f = this . game . world ) , void 0 === g && ( g = { } ) , void 0 === g . customClass && ( g . customClass = c . Sprite ) , void 0 === g . adjustY && ( g . adjustY = ! 0 ) ; var h = this . layers [ e ] . width , i = this . layers [ e ] . height ; if ( this . copy ( 0 , 0 , h , i , e ) , this . _results . length < 2 ) return 0 ; for ( var j , k = 0 , l = 1 , m = this . _results . length ; m > l ; l ++ ) if ( - 1 !== a . indexOf ( this . _results [ l ] . index ) ) { j = new g . customClass ( this . game , this . _results [ l ] . worldX , this . _results [ l ] . worldY , d ) ; for ( var n in g ) j [ n ] = g [ n ] ; f . add ( j ) , k ++ } if ( 1 === b . length ) for ( l = 0 ; l < a . length ; l ++ ) this . replace ( a [ l ] , b [ 0 ] , 0 , 0 , h , i , e ) ; else if ( b . length > 1 ) for ( l = 0 ; l < a . length ; l ++ ) this . replace ( a [ l ] , b [ l ] , 0 , 0 , h , i , e ) ; return k } , createLayer : function ( a , b , d , e , f ) { void 0 === b && ( b = this . game . width ) , void 0 === d && ( d = this . game . height ) , void 0 === e && ( e = this . game . world ) ; var g = a ; return "string" == typeof a && ( g = this . getLayerIndex ( a ) ) , null === g || g > this . layers . length ? void console . warn ( "Tilemap.createLayer: Invalid layer ID given: " + g ) : f ? e . add ( new c . TilemapLayerGL ( this . game , this , g , b , d ) ) : e . add ( new c . TilemapLayer ( this . game , this , g , b , d ) ) } , createBlankLayer : function ( a , b , d , e , f , g ) { if ( void 0 === g && ( g = this . game . world ) , null !== this . getLayerIndex ( a ) ) return void console . warn ( "Tilemap.createBlankLayer: Layer with matching name already exists" ) ; for ( var h , i = { name : a , x : 0 , y : 0 , width : b , height : d , widthInPixels : b * e , heightInPixels : d * f , alpha : 1 , visible : ! 0 , properties : { } , indexes : [ ] , callbacks : [ ] , bodies : [ ] , data : null } , j = [ ] , k = 0 ; d > k ; k ++ ) { h = [ ] ; for ( var l = 0 ; b > l ; l ++ ) h . push ( new c . Tile ( i , - 1 , l , k , e , f ) ) ; j . push ( h ) } i . data = j , this . layers . push ( i ) , this . currentLayer = this . layers . length - 1 ; var m = i . widthInPixels , n = i . heightInPixels ; m > this . game . width && ( m = this . game . width ) , n > this . game . height && ( n = this . game . height ) ; var j = new c . TilemapLayer ( this . game , this , this . layers . length - 1 , m , n ) ; return j . name = a , g . add ( j ) } , getIndex : function ( a , b ) { for ( var c = 0 ; c < a . length ; c ++ ) if ( a [ c ] . name === b ) return c ; return null } , getLayerIndex : function ( a ) { return this . getIndex ( this . layers , a ) } , getTilesetIndex : function ( a ) { return this . getIndex ( this . tilesets , a ) } , getImageIndex : function ( a ) { return this . getIndex ( this . images , a ) } , setTileIndexCallback : function ( a , b , c , d ) { if ( d = this . getLayer ( d ) , "number" == typeof a ) this . layers [ d ] . callbacks [ a ] = { callback : b , callbackContext : c } ; else for ( var e = 0 , f = a . length ; f > e ; e ++ ) this . layers [ d ] . callbacks [ a [ e ] ] = { callback : b , callbackContext : c } } , setTileLocationCallback : function ( a , b , c , d , e , f , g ) { if ( g = this . getLayer ( g ) , this . copy ( a , b , c , d , g ) , ! ( this . _results . length < 2 ) ) for ( var h = 1 ; h < this . _results . length ; h ++ ) this . _results [ h ] . setCollisionCallback ( e , f ) } , setCollision : function ( a , b , c , d ) { if ( void 0 === b && ( b = ! 0 ) , void 0 === d && ( d = ! 0 ) , c = this . getLayer ( c ) , "number" == typeof a ) return this . setCollisionByIndex ( a , b , c , ! 0 ) ; if ( Array . isArray ( a ) ) { for ( var e = 0 ; e < a . length ; e ++ ) this . setCollisionByIndex ( a [ e ] , b , c , ! 1 ) ; d && this . calculateFaces ( c ) } } , setCollisionBetween : function ( a , b , c , d , e ) { if ( void 0 === c && ( c = ! 0 ) , void 0 === e && ( e = ! 0 ) , d = this . getLayer
} , c . Particle . prototype . reset = function ( a , b , d ) { return c . Component . Reset . prototype . reset . call ( this , a , b , d ) , this . alpha = 1 , this . scale . set ( 1 ) , this . autoScale = ! 1 , this . autoAlpha = ! 1 , this } , c . Particles = function ( a ) { this . game = a , this . emitters = { } , this . ID = 0 } , c . 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 ] . exists && this . emitters [ a ] . update ( ) } } , c . Particles . prototype . constructor = c . Particles , c . Particles . Arcade = { } , c . Particles . Arcade . Emitter = function ( a , b , d , e ) { this . maxParticles = e || 50 , c . Group . call ( this , a ) , this . name = "emitter" + this . game . particles . ID ++ , this . type = c . EMITTER , this . physicsType = c . GROUP , this . area = new c . Rectangle ( b , d , 1 , 1 ) , this . minParticleSpeed = new c . Point ( - 100 , - 100 ) , this . maxParticleSpeed = new c . Point ( 100 , 100 ) , this . minParticleScale = 1 , this . maxParticleScale = 1 , this . scaleData = null , this . minRotation = - 360 , this . maxRotation = 360 , this . minParticleAlpha = 1 , this . maxParticleAlpha = 1 , this . alphaData = null , this . gravity = 100 , this . particleClass = c . Particle , this . particleDrag = new c . Point , this . angularDrag = 0 , this . frequency = 100 , this . lifespan = 2e3 , this . bounce = new c . Point , this . on = ! 1 , this . particleAnchor = new c . Point ( . 5 , . 5 ) , this . blendMode = c . blendModes . NORMAL , this . emitX = b , this . emitY = d , this . autoScale = ! 1 , this . autoAlpha = ! 1 , this . particleBringToTop = ! 1 , this . particleSendToBack = ! 1 , this . _minParticleScale = new c . Point ( 1 , 1 ) , this . _maxParticleScale = new c . Point ( 1 , 1 ) , this . _quantity = 0 , this . _timer = 0 , this . _counter = 0 , this . _flowQuantity = 0 , this . _flowTotal = 0 , this . _explode = ! 0 , this . _frames = null } , c . Particles . Arcade . Emitter . prototype = Object . create ( c . Group . prototype ) , c . Particles . Arcade . Emitter . prototype . constructor = c . Particles . Arcade . Emitter , c . Particles . Arcade . Emitter . prototype . update = function ( ) { if ( this . on && this . game . time . time >= this . _timer ) if ( this . _timer = this . game . time . time + this . frequency * this . game . time . slowMotion , 0 !== this . _flowTotal ) if ( this . _flowQuantity > 0 ) { for ( var a = 0 ; a < this . _flowQuantity ; a ++ ) if ( this . emitParticle ( ) && ( this . _counter ++ , - 1 !== this . _flowTotal && this . _counter >= this . _flowTotal ) ) { this . on = ! 1 ; break } } else this . emitParticle ( ) && ( this . _counter ++ , - 1 !== this . _flowTotal && this . _counter >= this . _flowTotal && ( this . on = ! 1 ) ) ; else this . emitParticle ( ) && ( this . _counter ++ , this . _quantity > 0 && this . _counter >= this . _quantity && ( this . on = ! 1 ) ) ; for ( var a = this . children . length ; a -- ; ) this . children [ a ] . exists && this . children [ a ] . update ( ) } , c . Particles . Arcade . Emitter . prototype . makeParticles = function ( a , b , c , d , e ) { void 0 === b && ( b = 0 ) , void 0 === c && ( c = this . maxParticles ) , void 0 === d && ( d = ! 1 ) , void 0 === e && ( e = ! 1 ) ; var f , g = 0 , h = a , i = b ; for ( this . _frames = b , c > this . maxParticles && ( this . maxParticles = c ) ; c > g ; ) Array . isArray ( a ) && ( h = this . game . rnd . pick ( a ) ) , Array . isArray ( b ) && ( i = this . game . rnd . pick ( b ) ) , f = new this . particleClass ( this . game , 0 , 0 , h , i ) , this . game . physics . arcade . enable ( f , ! 1 ) , d ? ( f . body . checkCollision . any = ! 0 , f . body . checkCollision . none = ! 1 ) : f . body . checkCollision . none = ! 0 , f . body . collideWorldBounds = e , f . body . skipQuadTree = ! 0 , f . exists = ! 1 , f . visible = ! 1 , f . anchor . copyFrom ( this . particleAnchor ) , this . add ( f ) , g ++ ; return this } , c . Particles . Arcade . Emitter . prototype . kill = function ( ) { return this . on = ! 1 , this . alive = ! 1 , this . exists = ! 1 , this } , c . Particles . Arcade . Emitter . prototype . revive = function ( ) { return this . alive = ! 0 , this . exists = ! 0 , this } , c . Particles . Arcade . Emitter . prototype . explode = function ( a , b ) { return this . _flowTotal = 0 , this . start ( ! 0 , a , 0 , b , ! 1 ) , this } , c . Particles . Arcade . Emitter . prototype . flow = function ( a , b , c , d , e ) { return ( void 0 === c || 0 === c ) && ( c = 1 ) , void 0 === d && ( d = - 1 ) , void 0 === e && ( e = ! 0 ) , c > this . maxParticles && ( c = this . maxParticles ) , this . _counter = 0 , this . _flowQuantity = c , this . _flowTotal = d , e ? ( this . start ( ! 0 , a , b , c ) , this . _counter += c , this . on = ! 0 , this . _timer = this . game . time . time + b * this . game . time . slowMotion ) : this . start ( ! 1 , a , b , c ) , this } , c . Particles . Arcade . Emitter . prototype . start = function ( a , b , c , d , e ) { if ( void 0 === a && ( a = ! 0 ) , void 0 === b && ( b = 0 ) , ( void 0 === c || null === c ) && ( c = 250 ) , void 0 === d && ( d = 0 ) , void 0 === e && ( e = ! 1 ) , d > this . maxParticles && ( d = this . maxParticles ) , this . revive ( ) , this . visible = ! 0 , this . lifespan = b , this . frequency = c , a || e ) for ( var f = 0 ; d > f ; f ++ ) this . emitParticle ( ) ; else this . on = ! 0 , this . _quantity = d , this .
if ( this . touchLocked = ! 1 , this . video . play ( ) , this . onPlay . dispatch ( this , this . loop , this . playbackRate ) , this . key ) { var a = this . game . cache . getVideo ( this . key ) ; a && ! a . isBlob && ( a . locked = ! 1 ) } return ! 0 } , grab : function ( a , b , c ) { return void 0 === a && ( a = ! 1 ) , void 0 === b && ( b = 1 ) , void 0 === c && ( c = null ) , null === this . snapshot ? void console . warn ( "Video.grab cannot run because Phaser.BitmapData is unavailable" ) : ( a && this . snapshot . cls ( ) , this . snapshot . copy ( this . video , 0 , 0 , this . width , this . height , 0 , 0 , this . width , this . height , 0 , 0 , 0 , 1 , 1 , b , c ) , this . snapshot ) } , removeVideoElement : function ( ) { if ( this . video ) { for ( this . video . parentNode && this . video . parentNode . removeChild ( this . video ) ; this . video . hasChildNodes ( ) ; ) this . video . removeChild ( this . video . firstChild ) ; this . video . removeAttribute ( "autoplay" ) , this . video . removeAttribute ( "src" ) , this . video = null } } , destroy : function ( ) { this . stop ( ) , this . removeVideoElement ( ) , this . touchLocked && this . game . input . touch . removeTouchLockCallback ( this . unlock , this ) , this . _retryID && window . clearTimeout ( this . _retryID ) } } , Object . defineProperty ( c . Video . prototype , "currentTime" , { get : function ( ) { return this . video ? this . video . currentTime : 0 } , set : function ( a ) { this . video . currentTime = a } } ) , Object . defineProperty ( c . Video . prototype , "duration" , { get : function ( ) { return this . video ? this . video . duration : 0 } } ) , Object . defineProperty ( c . Video . prototype , "progress" , { get : function ( ) { return this . video ? this . video . currentTime / this . video . duration : 0 } } ) , Object . defineProperty ( c . Video . 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 ) return ; this . _codeMuted = ! 1 , this . unsetMute ( ) } } } ) , Object . defineProperty ( c . Video . prototype , "paused" , { get : function ( ) { return this . _paused } , set : function ( a ) { if ( a = a || null , ! this . touchLocked ) if ( a ) { if ( this . _paused ) return ; this . _codePaused = ! 0 , this . setPause ( ) } else { if ( ! this . _paused ) return ; this . _codePaused = ! 1 , this . setResume ( ) } } } ) , Object . defineProperty ( c . Video . prototype , "volume" , { get : function ( ) { return this . video ? this . video . volume : 1 } , set : function ( a ) { 0 > a ? a = 0 : a > 1 && ( a = 1 ) , this . video && ( this . video . volume = a ) } } ) , Object . defineProperty ( c . Video . prototype , "playbackRate" , { get : function ( ) { return this . video ? this . video . playbackRate : 1 } , set : function ( a ) { this . video && ( this . video . playbackRate = a ) } } ) , Object . defineProperty ( c . Video . prototype , "loop" , { get : function ( ) { return this . video ? this . video . loop : ! 1 } , set : function ( a ) { a && this . video ? this . video . loop = "loop" : this . video && ( this . video . loop = "" ) } } ) , Object . defineProperty ( c . Video . prototype , "playing" , { get : function ( ) { return ! ( this . video . paused && this . video . ended ) } } ) , c . Video . prototype . constructor = c . Video , void 0 === PIXI . blendModes && ( PIXI . blendModes = c . blendModes ) , void 0 === PIXI . scaleModes && ( PIXI . scaleModes = c . scaleModes ) , void 0 === PIXI . Texture . emptyTexture && ( PIXI . Texture . emptyTexture = new PIXI . Texture ( new PIXI . BaseTexture ) ) , void 0 === PIXI . DisplayObject . _tempMatrix && ( PIXI . DisplayObject . _tempMatrix = new PIXI . Matrix ) , void 0 === PIXI . RenderTexture . tempMatrix && ( PIXI . RenderTexture . tempMatrix = new PIXI . Matrix ) , PIXI . Graphics && void 0 === PIXI . Graphics . POLY && ( PIXI . Graphics . POLY = c . POLYGON , PIXI . Graphics . RECT = c . RECTANGLE , PIXI . Graphics . CIRC = c . CIRCLE , PIXI . Graphics . ELIP = c . ELLIPSE , PIXI . Graphics . RREC = c . ROUNDEDRECTANGLE ) , PIXI . TextureSilentFail = ! 0 , "undefined" != typeof exports ? ( "undefined" != typeof module && module . exports && ( exports = module . exports = c ) , exports . Phaser = c ) : "undefined" != typeof define && define . amd ? define ( "Phaser" , function ( ) { return b . Phaser = c } ( ) ) : b . Phaser = c , c } ) . call ( this ) ;
2016-06-03 17:48:34 +00:00
//# sourceMappingURL=phaser-creature.map