2014-05-29 16:37:28 +00:00
/* Phaser (no libs) v2.0.6 - http://phaser.io - @photonstorm - (c) 2014 Photon Storm Ltd. */
2014-07-10 15:23:26 +00:00
( function ( ) { var a = this , b = b || { VERSION : "2.0.6" , 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 , 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 } } ; if ( PIXI . InteractionManager = PIXI . InteractionManager || function ( ) { } , PIXI . dontSayHello = ! 0 , b . Utils = { transposeArray : function ( a ) { for ( var b = new Array ( a [ 0 ] . length ) , c = 0 ; c < a [ 0 ] . length ; c ++ ) { b [ c ] = new Array ( a . length - 1 ) ; for ( var d = a . length - 1 ; d > - 1 ; d -- ) b [ c ] [ d ] = a [ d ] [ c ] } return b } , rotateArray : function ( a , c ) { if ( "string" != typeof c && ( c = ( c % 360 + 360 ) % 360 ) , 90 === c || - 270 === c || "rotateLeft" === c ) a = b . Utils . transposeArray ( a ) , a = a . reverse ( ) ; else if ( - 90 === c || 270 === c || "rotateRight" === c ) a = a . reverse ( ) , a = b . Utils . transposeArray ( a ) ; else if ( 180 === Math . abs ( c ) || "rotate180" === c ) { for ( var d = 0 ; d < a . length ; d ++ ) a [ d ] . reverse ( ) ; a = a . reverse ( ) } return a } , 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 } , 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 } , pad : function ( a , b , c , d ) { if ( "undefined" == typeof b ) var b = 0 ; if ( "undefined" == typeof c ) var c = " " ; if ( "undefined" == typeof 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 , c , d , e , f , g , h = arguments [ 0 ] || { } , i = 1 , j = arguments . length , k = ! 1 ; for ( "boolean" == typeof h && ( k = h , h = arguments [ 1 ] || { } , i = 2 ) , j === i && ( h = this , -- i ) ; j > i ; i ++ ) if ( null != ( a = arguments [ i ] ) ) for ( c in a ) d = h [ c ] , e = a [ c ] , h !== e && ( k && e && ( b . Utils . isPlainObject ( e ) || ( f = Array . isArray ( e ) ) ) ? ( f ? ( f = ! 1 , g = d && Array . isArray ( d ) ? d : [ ] ) : g = d && b . Utils . isPlainObject ( d ) ? d : { } , h [ c ] = b . Utils . extend ( k , g , e ) ) : void 0 !== e && ( h [ c ] = e ) ) ; return h } , mixin : function ( a , c ) { if ( ! a || "object" != typeof a ) return c ; for ( var d in a ) { var e = a [ d ] ; if ( ! e . childNodes && ! e . cloneNode ) { var f = typeof a [ d ] ; c [ d ] = a [ d ] && "object" === f ? typeof c [ d ] === f ? b . Utils . mixin ( a [ d ] , c [ d ] ) : b . Utils . mixin ( a [ d ] , new e . constructor ) : a [ d ] } } return c } } , "function" != typeof Function . prototype . bind && ( Function . prototype . bind = function ( ) { var a = Array . prototype . slice ; return function ( b ) { function c ( ) { var f = e . concat ( a . call ( arguments ) ) ; d . apply ( this instanceof c ? this : b , f ) } var d = this , e = a . call ( arguments , 1 ) ; if ( "function" != typeof d ) throw new TypeError ; return c . prototype = function f ( a ) { return a && ( f . prototype = a ) , this instanceof f ? void 0 : new f } ( d . prototype ) , c } } ( ) ) , Array . isArray || ( Array . isArray = function ( a ) { return "[object Array]" == Object . prototype . toString . call ( a ) } ) , 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 ) { var c = 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 ] } ; c ( "Uint32Array" ) , c ( "Int16Array" ) } window . console || ( window . console = { } , window . console . log = window . console . assert = function ( ) { } , window . console . warn = window . console . assert = function ( ) { } ) , b . Circle = function ( a , b , c ) { a = a || 0 , b = b |
} , resume : function ( ) { this . _created && this . onResumedCallback && this . onResumedCallback . call ( this . callbackContext , this . game ) } , update : function ( ) { this . _created && this . onUpdateCallback ? this . onUpdateCallback . call ( this . callbackContext , this . game ) : this . onLoadUpdateCallback && this . onLoadUpdateCallback . call ( this . callbackContext , this . game ) } , pauseUpdate : function ( ) { this . _created && this . onPauseUpdateCallback ? this . onPauseUpdateCallback . call ( this . callbackContext , this . game ) : this . onLoadUpdateCallback && this . onLoadUpdateCallback . call ( this . callbackContext , this . game ) } , preRender : function ( ) { this . onPreRenderCallback && this . onPreRenderCallback . call ( this . callbackContext , this . game ) } , render : function ( ) { this . _created && this . onRenderCallback ? ( this . game . renderType === b . CANVAS && ( this . game . context . save ( ) , this . game . context . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) ) , this . onRenderCallback . call ( this . callbackContext , this . game ) , this . game . renderType === b . CANVAS && this . game . context . restore ( ) ) : this . onLoadRenderCallback && this . onLoadRenderCallback . call ( this . callbackContext , this . game ) } , destroy : function ( ) { this . callbackContext = null , this . onInitCallback = null , this . onShutDownCallback = null , this . onPreloadCallback = null , this . onLoadRenderCallback = null , this . onLoadUpdateCallback = null , this . onCreateCallback = null , this . onUpdateCallback = null , this . onRenderCallback = null , this . onPausedCallback = null , this . onResumedCallback = null , this . onPauseUpdateCallback = null , this . game = null , this . states = { } , this . _pendingState = null } } , b . StateManager . prototype . constructor = b . StateManager , b . LinkedList = function ( ) { this . next = null , this . prev = null , this . first = null , this . last = null , this . total = 0 } , b . LinkedList . prototype = { add : function ( a ) { return 0 === this . total && null === this . first && null === this . last ? ( this . first = a , this . last = a , this . next = a , a . prev = this , this . total ++ , a ) : ( this . last . next = a , a . prev = this . last , this . last = a , this . total ++ , a ) } , reset : function ( ) { this . first = null , this . last = null , this . next = null , this . prev = null , this . total = 0 } , remove : function ( a ) { return 1 === this . total ? ( this . reset ( ) , void ( a . next = a . prev = null ) ) : ( a === this . first ? this . first = this . first . next : a === this . last && ( this . last = this . last . prev ) , a . prev && ( a . prev . next = a . next ) , a . next && ( a . next . prev = a . prev ) , a . next = a . prev = null , null === this . first && ( this . last = null ) , void this . total -- ) } , callAll : function ( a ) { if ( this . first && this . last ) { var b = this . first ; do b && b [ a ] && b [ a ] . call ( b ) , b = b . next ; while ( b != this . last . next ) } } } , b . LinkedList . prototype . constructor = b . LinkedList , b . ArrayList = function ( ) { this . total = 0 , this . position = 0 , this . list = [ ] } , b . ArrayList . prototype = { add : function ( a ) { return this . exists ( a ) || ( this . list . push ( a ) , this . total ++ ) , a } , getIndex : function ( a ) { return this . list . indexOf ( a ) } , exists : function ( a ) { return this . list . indexOf ( a ) > - 1 } , reset : function ( ) { this . list . length = 0 , this . total = 0 } , remove : function ( a ) { var b = this . list . indexOf ( a ) ; return b > - 1 ? ( this . list . splice ( b , 1 ) , this . total -- , a ) : void 0 } , callAll : function ( a ) { for ( var b = Array . prototype . splice . call ( arguments , 1 ) , c = this . list . length ; c -- ; ) this . list [ c ] && this . list [ c ] [ a ] && this . list [ c ] [ a ] . apply ( this . list [ c ] , b ) } } , Object . defineProperty ( b . ArrayList . prototype , "first" , { get : function ( ) { return this . position = 0 , this . total > 0 ? this . list [ 0 ] : null } } ) , Object . defineProperty ( b . ArrayList . prototype , "next" , { get : function ( ) { return this . position < this . total ? ( this . position ++ , this . list [ this . position ] ) : null } } ) , b . ArrayList . prototype . constructor = b . ArrayList , b . Signal = function ( ) { this . _bindings = [ ] , this . _prevParams = null ; var a = this ; this . dispatch = function ( ) { b . Signal . prototype . dispatch . apply ( a , arguments ) } } , b . Signal . prototype = { memorize : ! 1 , _shouldPropagate : ! 0 , active : ! 0 , validateListener : function ( a , b ) { if ( "function" != typeof a ) throw new Error ( "Phaser.Signal: listener is a required param of {fn}() and should be a Function." . replace ( "{fn}" , b ) ) } , _registerListener : function ( a , c , d , e ) { var f , g = this . _indexOfListener ( a , d ) ; if ( - 1 !== g ) { if ( f = this . _bindings [ g ] , f . isOnce ( ) !== c ) throw new Error ( "You cannot add" + ( c ? "" : "Once" ) + "() then add" + ( c ? "Once" : "" ) + "() the same listener without removing the relationship first." ) } else f = new b . SignalBinding ( this , a , c , d , e ) , this . _addBinding ( f ) ; return this . memorize && this . _prevParams && f . execute ( this . _prevParams ) , f } , _addBinding : function ( a ) { var b = th
} , checkOrientation : function ( a ) { this . event = a , this . orientation = window . orientation , this . isLandscape ? this . enterLandscape . dispatch ( this . orientation , ! 0 , ! 1 ) : this . enterPortrait . dispatch ( this . orientation , ! 1 , ! 0 ) , this . scaleMode !== b . ScaleManager . NO _SCALE && this . refresh ( ) } , checkResize : function ( a ) { this . event = a , this . orientation = window . outerWidth > window . outerHeight ? 90 : 0 , this . isLandscape ? this . enterLandscape . dispatch ( this . orientation , ! 0 , ! 1 ) : this . enterPortrait . dispatch ( this . orientation , ! 1 , ! 0 ) , this . scaleMode !== b . ScaleManager . NO _SCALE && this . refresh ( ) , this . checkOrientationState ( ) } , refresh : function ( ) { if ( this . game . device . iPad || this . game . device . webApp || this . game . device . desktop || ( this . game . device . android && ! this . game . device . chrome ? window . scrollTo ( 0 , 1 ) : window . scrollTo ( 0 , 0 ) ) , null === this . _check && this . maxIterations > 0 ) { this . _iterations = this . maxIterations ; var a = this ; this . _check = window . setInterval ( function ( ) { return a . setScreenSize ( ) } , 10 ) , this . setScreenSize ( ) } } , setScreenSize : function ( a ) { "undefined" == typeof a && ( a = ! 1 ) , this . game . device . iPad || this . game . device . webApp || this . game . device . desktop || ( this . game . device . android && ! this . game . device . chrome ? window . scrollTo ( 0 , 1 ) : window . scrollTo ( 0 , 0 ) ) , this . _iterations -- , ( a || window . innerHeight > this . _startHeight || this . _iterations < 0 ) && ( document . documentElement . style . minHeight = window . innerHeight + "px" , this . incorrectOrientation ? this . setMaximum ( ) : this . isFullScreen ? this . fullScreenScaleMode === b . ScaleManager . EXACT _FIT ? this . setExactFit ( ) : this . fullScreenScaleMode === b . ScaleManager . SHOW _ALL && this . setShowAll ( ) : this . scaleMode === b . ScaleManager . EXACT _FIT ? this . setExactFit ( ) : this . scaleMode === b . ScaleManager . SHOW _ALL && this . setShowAll ( ) , this . setSize ( ) , clearInterval ( this . _check ) , this . _check = null ) } , setSize : function ( ) { this . incorrectOrientation || ( this . maxWidth && this . width > this . maxWidth && ( this . width = this . maxWidth ) , this . maxHeight && this . height > this . maxHeight && ( this . height = this . maxHeight ) , this . minWidth && this . width < this . minWidth && ( this . width = this . minWidth ) , this . minHeight && this . height < this . minHeight && ( this . height = this . minHeight ) ) , this . game . canvas . style . width = this . width + "px" , this . game . canvas . style . height = this . height + "px" , this . game . input . scale . setTo ( this . game . width / this . width , this . game . height / this . height ) , this . pageAlignHorizontally && ( this . width < window . innerWidth && ! this . incorrectOrientation ? ( this . margin . x = Math . round ( ( window . innerWidth - this . width ) / 2 ) , this . game . canvas . style . marginLeft = this . margin . x + "px" ) : ( this . margin . x = 0 , this . game . canvas . style . marginLeft = "0px" ) ) , this . pageAlignVertically && ( this . height < window . innerHeight && ! this . incorrectOrientation ? ( this . margin . y = Math . round ( ( window . innerHeight - this . height ) / 2 ) , this . game . canvas . style . marginTop = this . margin . y + "px" ) : ( this . margin . y = 0 , this . game . canvas . style . marginTop = "0px" ) ) , b . Canvas . getOffset ( this . game . canvas , this . game . stage . offset ) , this . bounds . setTo ( this . game . stage . offset . x , this . game . stage . offset . y , this . width , this . height ) , this . aspectRatio = this . width / this . height , this . scaleFactor . x = this . game . width / this . width , this . scaleFactor . y = this . game . height / this . height , this . scaleFactorInversed . x = this . width / this . game . width , this . scaleFactorInversed . y = this . height / this . game . height , this . hasResized . dispatch ( this . width , this . height ) , this . checkOrientationState ( ) } , setMaximum : function ( ) { this . width = window . innerWidth , this . height = window . innerHeight } , setShowAll : function ( ) { var a = Math . min ( window . innerHeight / this . game . height , window . innerWidth / this . game . width ) ; this . width = Math . round ( this . game . width * a ) , this . height = Math . round ( this . game . height * a ) } , setExactFit : function ( ) { var a = window . innerWidth , b = window . innerHeight ; this . width = this . maxWidth && a > this . maxWidth ? this . maxWidth : a , this . height = this . maxHeight && b > this . maxHeight ? this . maxHeight : b } } , b . ScaleManager . prototype . constructor = b . ScaleManager , Object . defineProperty ( b . ScaleManager . prototype , "isFullScreen" , { get : function ( ) { return document . fullscreenElement || document . mozFullScreenElement || document . webkitFullscreenElement } } ) , Object . defineProperty ( b . ScaleManager . prototype , "isPortrait" , { get : function ( ) { return 0 === this . orientation || 180 === this . orientation } } ) , Object . defineProperty ( b . ScaleManager . prototype , "isLandscape" , { get : fu
} , b . MSPointer . prototype = { start : function ( ) { if ( null === this . _onMSPointerDown ) { var a = this ; this . game . device . mspointer === ! 0 && ( this . _onMSPointerDown = function ( b ) { return a . onPointerDown ( b ) } , this . _onMSPointerMove = function ( b ) { return a . onPointerMove ( b ) } , this . _onMSPointerUp = function ( b ) { return a . onPointerUp ( b ) } , this . game . renderer . view . addEventListener ( "MSPointerDown" , this . _onMSPointerDown , ! 1 ) , this . game . renderer . view . addEventListener ( "MSPointerMove" , this . _onMSPointerMove , ! 1 ) , this . game . renderer . view . addEventListener ( "MSPointerUp" , this . _onMSPointerUp , ! 1 ) , this . game . renderer . view . addEventListener ( "pointerDown" , this . _onMSPointerDown , ! 1 ) , this . game . renderer . view . addEventListener ( "pointerMove" , this . _onMSPointerMove , ! 1 ) , this . game . renderer . view . addEventListener ( "pointerUp" , this . _onMSPointerUp , ! 1 ) , this . game . renderer . view . style [ "-ms-content-zooming" ] = "none" , this . game . renderer . view . style [ "-ms-touch-action" ] = "none" ) } } , onPointerDown : function ( a ) { this . game . input . disabled || this . disabled || ( a . preventDefault ( ) , a . identifier = a . pointerId , this . game . input . startPointer ( a ) ) } , onPointerMove : function ( a ) { this . game . input . disabled || this . disabled || ( a . preventDefault ( ) , a . identifier = a . pointerId , this . game . input . updatePointer ( a ) ) } , onPointerUp : function ( a ) { this . game . input . disabled || this . disabled || ( a . preventDefault ( ) , a . identifier = a . pointerId , this . game . input . stopPointer ( a ) ) } , stop : function ( ) { this . game . canvas . removeEventListener ( "MSPointerDown" , this . _onMSPointerDown ) , this . game . canvas . removeEventListener ( "MSPointerMove" , this . _onMSPointerMove ) , this . game . canvas . removeEventListener ( "MSPointerUp" , this . _onMSPointerUp ) , this . game . canvas . removeEventListener ( "pointerDown" , this . _onMSPointerDown ) , this . game . canvas . removeEventListener ( "pointerMove" , this . _onMSPointerMove ) , this . game . canvas . removeEventListener ( "pointerUp" , this . _onMSPointerUp ) } } , b . MSPointer . prototype . constructor = b . MSPointer , b . Pointer = function ( a , c ) { this . game = a , this . id = c , this . type = b . POINTER , this . exists = ! 0 , this . identifier = 0 , this . pointerId = null , this . target = null , this . button = null , this . _holdSent = ! 1 , this . _history = [ ] , this . _nextDrop = 0 , this . _stateReset = ! 1 , this . withinGame = ! 1 , this . clientX = - 1 , this . clientY = - 1 , this . pageX = - 1 , this . pageY = - 1 , this . screenX = - 1 , this . screenY = - 1 , this . rawMovementX = 0 , this . rawMovementY = 0 , this . movementX = 0 , this . movementY = 0 , this . x = - 1 , this . y = - 1 , this . isMouse = ! 1 , this . isDown = ! 1 , this . isUp = ! 0 , this . timeDown = 0 , this . timeUp = 0 , this . previousTapTime = 0 , this . totalTouches = 0 , this . msSinceLastClick = Number . MAX _VALUE , this . targetObject = null , this . active = ! 1 , this . position = new b . Point , this . positionDown = new b . Point , this . positionUp = new b . Point , this . circle = new b . Circle ( 0 , 0 , 44 ) , 0 === c && ( this . isMouse = ! 0 ) } , b . Pointer . prototype = { start : function ( a ) { return a . pointerId && ( this . pointerId = a . pointerId ) , this . identifier = a . identifier , this . target = a . target , "undefined" != typeof a . button && ( this . button = a . button ) , this . _history = [ ] , this . active = ! 0 , this . withinGame = ! 0 , this . isDown = ! 0 , this . isUp = ! 1 , this . msSinceLastClick = this . game . time . now - this . timeDown , this . timeDown = this . game . time . now , this . _holdSent = ! 1 , this . move ( a , ! 0 ) , this . positionDown . setTo ( this . x , this . y ) , ( this . game . input . multiInputOverride === b . Input . MOUSE _OVERRIDES _TOUCH || this . game . input . multiInputOverride === b . Input . MOUSE _TOUCH _COMBINE || this . game . input . multiInputOverride === b . Input . TOUCH _OVERRIDES _MOUSE && 0 === this . game . input . currentPointers ) && ( this . game . input . x = this . x , this . game . input . y = this . y , this . game . input . position . setTo ( this . x , this . y ) , this . game . input . onDown . dispatch ( this , a ) , this . game . input . resetSpeed ( this . x , this . y ) ) , this . _stateReset = ! 1 , this . totalTouches ++ , this . isMouse || this . game . input . currentPointers ++ , null !== this . targetObject && this . targetObject . _touchedHandler ( this ) , this } , update : function ( ) { this . active && ( this . _holdSent === ! 1 && this . duration >= this . game . input . holdRate && ( ( this . game . input . multiInputOverride == b . Input . MOUSE _OVERRIDES _TOUCH || this . game . input . multiInputOverride == b . Input . MOUSE _TOUCH _COMBINE || this . game . input . multiInputOverride == b . Input . TOUCH _OVERRIDES _MOUSE && 0 === this . game . input . currentPointers ) && this . game . input . onHold . dispatch ( this ) , this . _holdSent = ! 0 ) , this . game . input . recordPointerHistory && this . game . time . now >= this . _nextDrop && ( this . _
} , 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 . now - 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 . now - this . _pointerData [ a ] . timeUp < b } , overDuration : function ( a ) { return a = a || 0 , this . _pointerData [ a ] . isOver ? this . game . time . now - this . _pointerData [ a ] . timeOver : - 1 } , downDuration : function ( a ) { return a = a || 0 , this . _pointerData [ a ] . isDown ? this . game . time . now - this . _pointerData [ a ] . timeDown : - 1 } , enableDrag : function ( a , c , d , e , f , g ) { "undefined" == typeof a && ( a = ! 1 ) , "undefined" == typeof c && ( c = ! 1 ) , "undefined" == typeof d && ( d = ! 1 ) , "undefined" == typeof e && ( e = 255 ) , "undefined" == typeof f && ( f = null ) , "undefined" == typeof g && ( g = null ) , this . _dragPoint = new b . Point , this . draggable = ! 0 , this . bringToTop = c , this . dragOffset = new b . Point , this . dragFromCenter = a , this . pixelPerfect = 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 } , startDrag : function ( a ) { if ( this . isDragged = ! 0 , this . _draggedPointerID = a . id , this . _pointerData [ a . id ] . isDragged = ! 0 , this . sprite . fixedToCamera ) this . dragFromCenter ? ( this . sprite . centerOn ( a . x , a . y ) , this . _dragPoint . setTo ( this . sprite . cameraOffset . x - a . x , this . sprite . cameraOffset . y - a . y ) ) : this . _dragPoint . setTo ( this . sprite . cameraOffset . x - a . x , this . sprite . cameraOffset . y - a . y ) ; else if ( this . dragFromCenter ) { var b = this . sprite . getBounds ( ) ; this . sprite . x = a . x + ( this . sprite . x - b . centerX ) , this . sprite . y = a . y + ( this . sprite . y - b . centerY ) , this . _dragPoint . setTo ( this . sprite . x - a . x , this . sprite . y - a . y ) } else this . _dragPoint . setTo ( this . sprite . x - a . x , this . sprite . y - a . y ) ; this . updateDrag ( a ) , this . bringToTop && ( this . _dragPhase = ! 0 , this . sprite . bringToTop ( ) ) , this . sprite . events . onDragStart . dispatch ( this . sprite , a ) } , stopDrag : function ( a ) { this . isDragged = ! 1 , this . _draggedPointerID = - 1 , this . _pointerData [ a . id ] . isDragged = ! 1 , this . _dragPhase = ! 1 , this . snapOnRelease && ( this . sprite . fixedToCamera ? ( 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 . 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 . sprite . events . onDragStop . dispatch ( this . sprite , a ) , this . checkPointerOver ( a ) === ! 1 && this . _pointerOutHandler ( a ) } , setDragLock : function ( a , b ) { "undefined" == typeof a && ( a = ! 0 ) , "undefined" == typeof b && ( b = ! 0 ) , this . allowHorizontalDrag = a , this . allowVerticalDrag = b } , enableSnap : function ( a , b , c , d , e , f ) { "undefined" == typeof c && ( c = ! 0 ) , "undefined" == typeof d && ( d = ! 1 ) , "undefined" == typeof e && ( e = 0 ) , "undefined" == typeof f && ( f = 0 ) , this . snapX = a , this . snapY = b , this . snapOffsetX = e , this . snapOffsetY = f , this . snapOnDrag = c , this . snapOnRelease = d } , disableSnap : function ( ) { this . snapOnDrag = ! 1 , this . snapOnRelease = ! 1 } , checkBoundsRect : function ( ) { this . sprite . fixedToCamera ? ( this . sprite . cameraOffset . x < this . boundsRect . left ? this . sprite . cameraOffset . x = this . boundsRect . cameraOffset . x : this . sprite . cameraOffset . x + this . sprite . width > this . boundsRect . right && ( this . sprite . cameraOffset . x = this . boundsRect . right - this . sprite . width ) , this . sprite . cameraOffset . y < this . boundsRect . top ? this . sprite . cameraOffset . y = this . boundsRect . top : this . sprite . cameraOffset . y + this . sprite . height > this . boundsRect . bottom && ( this . sprite . cameraOffset . y = this . boundsRect . bottom - this . sprite . height ) ) : ( this . sprite . x < this . boundsRect . left ? this . sprite . x = this . boundsRect . x : this . sprite . x + this . sprite . width > this . boundsRect . right && ( this . sprite . x = this . boundsRect . right - this . sprite . width ) , this . sprite . y < this . boundsRect . top ? this . sprite . y = this . boundsR
} } ) , Object . defineProperty ( b . Image . prototype , "fixedToCamera" , { get : function ( ) { return ! ! this . _cache [ 7 ] } , set : function ( a ) { a ? ( this . _cache [ 7 ] = 1 , this . cameraOffset . set ( this . x , this . y ) ) : this . _cache [ 7 ] = 0 } } ) , Object . defineProperty ( b . Image . prototype , "smoothed" , { get : function ( ) { return ! this . texture . baseTexture . scaleMode } , set : function ( a ) { a ? this . texture && ( this . texture . baseTexture . scaleMode = 0 ) : this . texture && ( this . texture . baseTexture . scaleMode = 1 ) } } ) , Object . defineProperty ( b . Image . prototype , "destroyPhase" , { get : function ( ) { return ! ! this . _cache [ 8 ] } } ) , b . TileSprite = function ( a , c , d , e , f , g , h ) { c = c || 0 , d = d || 0 , e = e || 256 , f = f || 256 , g = g || null , h = h || null , this . game = a , this . name = "" , this . type = b . TILESPRITE , this . z = 0 , this . events = new b . Events ( this ) , this . animations = new b . AnimationManager ( this ) , this . key = g , this . _frame = 0 , this . _frameName = "" , this . _scroll = new b . Point , PIXI . TilingSprite . call ( this , PIXI . TextureCache . _ _default , e , f ) , this . position . set ( c , d ) , this . input = null , this . world = new b . Point ( c , d ) , this . autoCull = ! 1 , this . checkWorldBounds = ! 1 , this . cameraOffset = new b . Point , this . body = null , this . _cache = [ 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 ] , this . loadTexture ( g , h ) } , b . TileSprite . prototype = Object . create ( PIXI . TilingSprite . prototype ) , b . TileSprite . prototype . constructor = b . TileSprite , b . TileSprite . prototype . preUpdate = function ( ) { if ( 1 === this . _cache [ 4 ] && this . exists ) return this . world . setTo ( this . parent . position . x + this . position . x , this . parent . position . y + this . position . y ) , this . worldTransform . tx = this . world . x , this . worldTransform . ty = this . world . y , this . _cache [ 0 ] = this . world . x , this . _cache [ 1 ] = this . world . y , this . _cache [ 2 ] = this . rotation , this . body && this . body . preUpdate ( ) , this . _cache [ 4 ] = 0 , ! 1 ; if ( this . _cache [ 0 ] = this . world . x , this . _cache [ 1 ] = this . world . y , this . _cache [ 2 ] = this . rotation , ! this . exists || ! this . parent . exists ) return this . _cache [ 3 ] = - 1 , ! 1 ; ( this . autoCull || this . checkWorldBounds ) && this . _bounds . copyFrom ( this . getBounds ( ) ) , this . autoCull && ( this . renderable = this . game . world . camera . screenView . intersects ( this . _bounds ) ) , this . checkWorldBounds && ( 1 === this . _cache [ 5 ] && this . game . world . bounds . intersects ( this . _bounds ) ? ( this . _cache [ 5 ] = 0 , this . events . onEnterBounds . dispatch ( this ) ) : 0 !== this . _cache [ 5 ] || this . game . world . bounds . intersects ( this . _bounds ) || ( this . _cache [ 5 ] = 1 , this . events . onOutOfBounds . dispatch ( this ) ) ) , this . world . setTo ( this . game . camera . x + this . worldTransform . tx , this . game . camera . y + this . worldTransform . ty ) , this . visible && ( this . _cache [ 3 ] = this . game . stage . currentRenderOrderID ++ ) , this . animations . update ( ) , 0 !== this . _scroll . x && ( this . tilePosition . x += this . _scroll . x * this . game . time . physicsElapsed ) , 0 !== this . _scroll . y && ( this . tilePosition . y += this . _scroll . y * this . game . time . physicsElapsed ) , this . body && this . body . preUpdate ( ) ; for ( var a = 0 , b = this . children . length ; b > a ; a ++ ) this . children [ a ] . preUpdate ( ) ; return ! 0 } , b . TileSprite . prototype . update = function ( ) { } , b . TileSprite . prototype . postUpdate = function ( ) { this . exists && this . body && this . body . postUpdate ( ) , 1 === this . _cache [ 7 ] && ( this . position . x = this . game . camera . view . x + this . cameraOffset . x , this . position . y = this . game . camera . view . y + this . cameraOffset . y ) ; for ( var a = 0 , b = this . children . length ; b > a ; a ++ ) this . children [ a ] . postUpdate ( ) } , b . TileSprite . prototype . autoScroll = function ( a , b ) { this . _scroll . set ( a , b ) } , b . TileSprite . prototype . stopScroll = function ( ) { this . _scroll . set ( 0 , 0 ) } , b . TileSprite . prototype . loadTexture = function ( a , c ) { c = c || 0 , this . key = a , a instanceof b . RenderTexture ? ( this . key = a . key , this . setTexture ( a ) ) : a instanceof b . BitmapData ? this . setTexture ( a . texture ) : a instanceof PIXI . Texture ? this . setTexture ( a ) : null === a || "undefined" == typeof a ? ( this . key = "__default" , this . setTexture ( PIXI . TextureCache [ this . key ] ) ) : "string" != typeof a || this . game . cache . checkImageKey ( a ) ? ( this . setTexture ( new PIXI . Texture ( PIXI . BaseTextureCache [ a ] ) ) , this . animations . loadFrameData ( this . game . cache . getFrameData ( a ) , c ) ) : ( this . key = "__missing" , this . setTexture ( PIXI . TextureCache [ this . key ] ) ) } , b . TileSprite . prototype . setFrame = function ( a ) { this . texture . frame . x = a . x , this . texture . frame . y = a . y , this . texture . frame . width = a . width , this . texture . frame . height = a . height , this . texture . crop . x = a . x , this . texture . crop . y = a . y , this . texture . crop . width = a . width , this . texture . crop . height = a . height , a . trimmed && ( this . texture . trim ? ( this . texture . trim . x = a . spriteSour
} return b } , b . RetroFont . prototype . updateOffset = function ( a , b ) { if ( this . offsetX !== a || this . offsetY !== b ) { for ( var c = a - this . offsetX , d = b - this . offsetY , e = this . game . cache . getFrameData ( this . stamp . key ) . getFrames ( ) , f = e . length ; f -- ; ) e [ f ] . x += c , e [ f ] . y += d , PIXI . TextureCache [ e [ f ] . uuid ] . frame . x = e [ f ] . x , PIXI . TextureCache [ e [ f ] . uuid ] . frame . y = e [ f ] . y ; this . buildRetroFontText ( ) } } , Object . defineProperty ( b . RetroFont . prototype , "text" , { get : function ( ) { return this . _text } , set : function ( a ) { var b ; b = this . autoUpperCase ? a . toUpperCase ( ) : a , b !== this . _text && ( this . _text = b , this . removeUnsupportedCharacters ( this . multiLine ) , this . buildRetroFontText ( ) ) } } ) , Object . defineProperty ( b . RetroFont . prototype , "smoothed" , { get : function ( ) { return this . stamp . smoothed } , set : function ( a ) { this . stamp . smoothed = a , this . buildRetroFontText ( ) } } ) , b . Particle = function ( a , c , d , e , f ) { b . Sprite . call ( this , a , c , d , e , f ) , this . autoScale = ! 1 , this . scaleData = null , this . _s = 0 , this . autoAlpha = ! 1 , this . alphaData = null , this . _a = 0 } , b . Particle . prototype = Object . create ( b . Sprite . prototype ) , b . Particle . prototype . constructor = b . Particle , b . Particle . prototype . update = function ( ) { this . autoScale && ( this . _s -- , this . _s ? this . scale . set ( this . scaleData [ this . _s ] . x , this . scaleData [ this . _s ] . y ) : this . autoScale = ! 1 ) , this . autoAlpha && ( this . _a -- , this . _a ? this . alpha = this . alphaData [ this . _a ] . v : this . autoAlpha = ! 1 ) } , b . Particle . prototype . onEmit = function ( ) { } , b . Particle . prototype . setAlphaData = function ( a ) { this . alphaData = a , this . _a = a . length - 1 , this . alpha = this . alphaData [ this . _a ] . v , this . autoAlpha = ! 0 } , b . Particle . prototype . setScaleData = function ( a ) { this . scaleData = a , this . _s = a . length - 1 , this . scale . set ( this . scaleData [ this . _s ] . x , this . scaleData [ this . _s ] . y ) , this . autoScale = ! 0 } , b . Particle . prototype . reset = function ( a , b , c ) { return "undefined" == typeof c && ( c = 1 ) , this . world . setTo ( a , b ) , this . position . x = a , this . position . y = b , this . alive = ! 0 , this . exists = ! 0 , this . visible = ! 0 , this . renderable = ! 0 , this . _outOfBoundsFired = ! 1 , this . health = c , this . body && this . body . reset ( a , b , ! 1 , ! 1 ) , this . _cache [ 4 ] = 1 , this . alpha = 1 , this . scale . set ( 1 ) , this . autoScale = ! 1 , this . autoAlpha = ! 1 , this } , b . Canvas = { create : function ( a , b , c , d ) { "undefined" == typeof d && ( d = ! 1 ) , a = a || 256 , b = b || 256 ; var e = document . createElement ( "canvas" ) ; return "string" == typeof c && "" !== c && ( e . id = c ) , e . width = a , e . height = b , e . style . display = "block" , e } , getOffset : function ( a , c ) { c = c || new b . Point ; var d = a . getBoundingClientRect ( ) , e = a . clientTop || document . body . clientTop || 0 , f = a . clientLeft || document . body . clientLeft || 0 , g = 0 , h = 0 ; return "CSS1Compat" === document . compatMode ? ( g = window . pageYOffset || document . documentElement . scrollTop || a . scrollTop || 0 , h = window . pageXOffset || document . documentElement . scrollLeft || a . scrollLeft || 0 ) : ( g = window . pageYOffset || document . body . scrollTop || a . scrollTop || 0 , h = window . pageXOffset || document . body . scrollLeft || a . scrollLeft || 0 ) , c . x = d . left + h - f , c . y = d . top + g - e , c } , getAspectRatio : function ( a ) { return a . width / a . height } , setBackgroundColor : function ( a , b ) { return b = b || "rgb(0,0,0)" , a . style . backgroundColor = b , a } , setTouchAction : function ( a , b ) { return b = b || "none" , a . style . msTouchAction = b , a . style [ "ms-touch-action" ] = b , a . style [ "touch-action" ] = b , a } , setUserSelect : function ( a , b ) { return b = b || "none" , a . style [ "-webkit-touch-callout" ] = b , a . style [ "-webkit-user-select" ] = b , a . style [ "-khtml-user-select" ] = b , a . style [ "-moz-user-select" ] = b , a . style [ "-ms-user-select" ] = b , a . style [ "user-select" ] = b , a . style [ "-webkit-tap-highlight-color" ] = "rgba(0, 0, 0, 0)" , a } , addToDOM : function ( a , b , c ) { var d ; return "undefined" == typeof c && ( c = ! 0 ) , b && ( "string" == typeof b ? d = document . getElementById ( b ) : "object" == typeof b && 1 === b . nodeType && ( d = b ) ) , d || ( d = document . body ) , c && d . style && ( d . style . overflow = "hidden" ) , d . appendChild ( a ) , a } , setTransform : function ( a , b , c , d , e , f , g ) { return a . setTransform ( d , f , g , e , b , c ) , a } , setSmoothingEnabled : function ( a , b ) { return a . imageSmoothingEnabled = b , a . mozImageSmoothingEnabled = b , a . oImageSmoothingEnabled = b , a . webkitImageSmoothingEnabled = b , a . msImageSmoothingEnabled = b , a } , setImageRenderingCrisp : function ( a ) { return a . style [ "image-rendering" ] = "optimizeSpeed" , a . style [ "image-rendering" ] = "crisp-edges" , a . style [ "image-rendering" ] = "-moz-crisp-edges" , a . style [ "image-rendering" ] = "-webkit-optimize-contrast" , a . style [ "image-rendering" ] = "optimize-contrast" , a . style . msInterpolationMo
} } , Back : { In : function ( a ) { var b = 1.70158 ; return a * a * ( ( b + 1 ) * a - b ) } , Out : function ( a ) { var b = 1.70158 ; return -- a * a * ( ( b + 1 ) * a + b ) + 1 } , InOut : function ( a ) { var b = 2.5949095 ; return ( a *= 2 ) < 1 ? . 5 * a * a * ( ( b + 1 ) * a - b ) : . 5 * ( ( a -= 2 ) * a * ( ( b + 1 ) * a + b ) + 2 ) } } , Bounce : { In : function ( a ) { return 1 - b . Easing . Bounce . Out ( 1 - a ) } , Out : function ( a ) { return 1 / 2.75 > a ? 7.5625 * a * a : 2 / 2.75 > a ? 7.5625 * ( a -= 1.5 / 2.75 ) * a + . 75 : 2.5 / 2.75 > a ? 7.5625 * ( a -= 2.25 / 2.75 ) * a + . 9375 : 7.5625 * ( a -= 2.625 / 2.75 ) * a + . 984375 } , InOut : function ( a ) { return . 5 > a ? . 5 * b . Easing . Bounce . In ( 2 * a ) : . 5 * b . Easing . Bounce . Out ( 2 * a - 1 ) + . 5 } } } , b . Time = function ( a ) { this . game = a , this . time = 0 , this . now = 0 , this . elapsed = 0 , this . pausedTime = 0 , this . advancedTiming = ! 1 , this . fps = 0 , this . fpsMin = 1e3 , this . fpsMax = 0 , this . msMin = 1e3 , this . msMax = 0 , this . physicsElapsed = 0 , this . deltaCap = 0 , this . timeCap = 1e3 , this . frames = 0 , this . pauseDuration = 0 , this . timeToCall = 0 , this . lastTime = 0 , this . events = new b . Timer ( this . game , ! 1 ) , this . _started = 0 , this . _timeLastSecond = 0 , this . _pauseStarted = 0 , this . _justResumed = ! 1 , this . _timers = [ ] , this . _len = 0 , this . _i = 0 } , b . Time . prototype = { boot : function ( ) { this . _started = Date . now ( ) , this . events . start ( ) } , add : function ( a ) { return this . _timers . push ( a ) , a } , create : function ( a ) { "undefined" == typeof a && ( a = ! 0 ) ; var c = new b . Timer ( this . game , a ) ; return this . _timers . push ( c ) , c } , removeAll : function ( ) { for ( var a = 0 ; a < this . _timers . length ; a ++ ) this . _timers [ a ] . destroy ( ) ; this . _timers = [ ] , this . events . removeAll ( ) } , update : function ( a ) { if ( this . now = a , this . timeToCall = this . game . math . max ( 0 , 16 - ( a - this . lastTime ) ) , this . elapsed = this . now - this . time , this . elapsed > this . timeCap && ( this . elapsed = 1 / 60 ) , this . physicsElapsed = this . elapsed / 1e3 || 1 / 60 , this . deltaCap > 0 && this . physicsElapsed > this . deltaCap && ( this . physicsElapsed = this . deltaCap ) , this . advancedTiming && ( this . msMin = this . game . math . min ( this . msMin , this . elapsed ) , this . msMax = this . game . math . max ( this . msMax , this . elapsed ) , this . frames ++ , this . now > this . _timeLastSecond + 1e3 && ( this . fps = Math . round ( 1e3 * this . frames / ( this . now - this . _timeLastSecond ) ) , this . fpsMin = this . game . math . min ( this . fpsMin , this . fps ) , this . fpsMax = this . game . math . max ( this . fpsMax , this . fps ) , this . _timeLastSecond = this . now , this . frames = 0 ) ) , this . time = this . now , this . lastTime = a + this . timeToCall , ! this . game . paused ) for ( this . events . update ( this . now ) , this . _i = 0 , this . _len = this . _timers . length ; this . _i < this . _len ; ) this . _timers [ this . _i ] . update ( this . now ) ? this . _i ++ : ( this . _timers . splice ( this . _i , 1 ) , this . _len -- ) } , gamePaused : function ( ) { this . _pauseStarted = this . now , this . events . pause ( ) ; for ( var a = this . _timers . length ; a -- ; ) this . _timers [ a ] . _pause ( ) } , gameResumed : function ( ) { this . time = this . now = Date . now ( ) , this . pauseDuration = this . time - this . _pauseStarted , this . events . resume ( ) ; for ( var a = this . _timers . length ; a -- ; ) this . _timers [ a ] . _resume ( ) } , totalElapsedSeconds : function ( ) { return . 001 * ( this . now - this . _started ) } , elapsedSince : function ( a ) { return this . now - a } , elapsedSecondsSince : function ( a ) { return . 001 * ( this . now - a ) } , reset : function ( ) { this . _started = this . now , this . removeAll ( ) } } , b . Time . prototype . constructor = b . Time , b . Timer = function ( a , c ) { "undefined" == typeof c && ( c = ! 0 ) , this . game = a , this . running = ! 1 , this . autoDestroy = c , this . expired = ! 1 , this . elapsed = 0 , this . events = [ ] , this . onComplete = new b . Signal , this . nextTick = 0 , this . timeCap = 1e3 , this . paused = ! 1 , this . _codePaused = ! 1 , this . _started = 0 , this . _pauseStarted = 0 , this . _pauseTotal = 0 , this . _now = Date . now ( ) , this . _len = 0 , this . _marked = 0 , this . _i = 0 , this . _diff = 0 , this . _newTick = 0 } , b . Timer . MINUTE = 6e4 , b . Timer . SECOND = 1e3 , b . Timer . HALF = 500 , b . Timer . QUARTER = 250 , b . Timer . prototype = { create : function ( a , c , d , e , f , g ) { var h = a ; h += 0 === this . _now ? this . game . time . now : this . _now ; var i = new b . TimerEvent ( this , a , h , d , c , e , f , g ) ; return this . events . push ( i ) , this . order ( ) , this . expired = ! 1 , i } , add : function ( a , b , c ) { return this . create ( a , ! 1 , 0 , b , c , Array . prototype . splice . call ( arguments , 3 ) ) } , repeat : function ( a , b , c , d ) { return this . create ( a , ! 1 , b , c , d , Array . prototype . splice . call ( arguments , 4 ) ) } , loop : function ( a , b , c ) { return this . create ( a , ! 0 , 0 , b , c , Array . prototype . splice . call ( arguments , 3 ) ) } , start : function ( a ) { if ( ! this . running ) { this . _started = this . game . time . now + ( a || 0 ) , this . running = ! 0 ; for ( var b = 0 ; b < this . events . length ; b ++ ) this . events [ b ] . tick = this . events [ b ] . delay + this . _started } } , stop : function ( a ) { this . running = ! 1 , "undefined" == typeof a && ( a = ! 0 ) , a && ( this . e
for ( var a in this . _tilemaps ) delete this . _tilemaps [ a ] ; for ( var a in this . _binary ) delete this . _binary [ a ] ; for ( var a in this . _bitmapDatas ) delete this . _bitmapDatas [ a ] ; for ( var a in this . _bitmapFont ) delete this . _bitmapFont [ a ] } } , b . Cache . prototype . constructor = b . Cache , b . Loader = function ( a ) { this . game = a , this . isLoading = ! 1 , this . hasLoaded = ! 1 , this . progress = 0 , this . progressFloat = 0 , this . preloadSprite = null , this . crossOrigin = ! 1 , this . baseURL = "" , this . onLoadStart = new b . Signal , this . onFileStart = new b . Signal , this . onFileComplete = new b . Signal , this . onFileError = new b . Signal , this . onLoadComplete = new b . Signal , this . _packList = [ ] , this . _packIndex = 0 , this . _fileList = [ ] , this . _fileIndex = 0 , this . _progressChunk = 0 , this . _xhr = new XMLHttpRequest , this . _ajax = null } , b . Loader . TEXTURE _ATLAS _JSON _ARRAY = 0 , b . Loader . TEXTURE _ATLAS _JSON _HASH = 1 , b . Loader . TEXTURE _ATLAS _XML _STARLING = 2 , b . Loader . PHYSICS _LIME _CORONA _JSON = 3 , b . Loader . PHYSICS _PHASER _JSON = 4 , b . Loader . prototype = { setPreloadSprite : function ( a , c ) { c = c || 0 , this . preloadSprite = { sprite : a , direction : c , width : a . width , height : a . height , rect : null } , this . preloadSprite . rect = 0 === c ? new b . Rectangle ( 0 , 0 , 1 , a . height ) : new b . Rectangle ( 0 , 0 , a . width , 1 ) , a . crop ( this . preloadSprite . rect ) , a . visible = ! 0 } , checkKeyExists : function ( a , b ) { if ( this . _fileList . length > 0 ) for ( var c = 0 ; c < this . _fileList . length ; c ++ ) if ( this . _fileList [ c ] . type === a && this . _fileList [ c ] . key === b ) return ! 0 ; return ! 1 } , getAssetIndex : function ( a , b ) { if ( this . _fileList . length > 0 ) for ( var c = 0 ; c < this . _fileList . length ; c ++ ) if ( this . _fileList [ c ] . type === a && this . _fileList [ c ] . key === b ) return c ; return - 1 } , getAsset : function ( a , b ) { if ( this . _fileList . length > 0 ) for ( var c = 0 ; c < this . _fileList . length ; c ++ ) if ( this . _fileList [ c ] . type === a && this . _fileList [ c ] . key === b ) return { index : c , file : this . _fileList [ c ] } ; return ! 1 } , reset : function ( ) { this . preloadSprite = null , this . isLoading = ! 1 , this . _packList . length = 0 , this . _packIndex = 0 , this . _fileList . length = 0 , this . _fileIndex = 0 } , addToFileList : function ( a , b , c , d ) { var e = { type : a , key : b , url : c , data : null , error : ! 1 , loaded : ! 1 } ; if ( "undefined" != typeof d ) for ( var f in d ) e [ f ] = d [ f ] ; this . checkKeyExists ( a , b ) === ! 1 && this . _fileList . push ( e ) } , replaceInFileList : function ( a , b , c , d ) { var e = { type : a , key : b , url : c , data : null , error : ! 1 , loaded : ! 1 } ; if ( "undefined" != typeof d ) for ( var f in d ) e [ f ] = d [ f ] ; var g = this . getAssetIndex ( a , b ) ; - 1 === g ? this . _fileList . push ( e ) : this . _fileList [ g ] = e } , pack : function ( a , b , c , d ) { return "undefined" == typeof b && ( b = null ) , "undefined" == typeof c && ( c = null ) , "undefined" == typeof d && ( d = this ) , null === b && null === c ? ( console . warn ( "Phaser.Loader.pack - Both url and data are null. One must be set." ) , this ) : ( c && "string" == typeof c && ( c = JSON . parse ( c ) ) , this . _packList . push ( { key : a , url : b , data : c , loaded : ! 1 , error : ! 1 , callbackContext : d } ) , this ) } , image : function ( a , b , c ) { return "undefined" == typeof c && ( c = ! 1 ) , c ? this . replaceInFileList ( "image" , a , b ) : this . addToFileList ( "image" , a , b ) , this } , text : function ( a , b , c ) { return "undefined" == typeof c && ( c = ! 1 ) , c ? this . replaceInFileList ( "text" , a , b ) : this . addToFileList ( "text" , a , b ) , this } , json : function ( a , b , c ) { return "undefined" == typeof c && ( c = ! 1 ) , c ? this . replaceInFileList ( "json" , a , b ) : this . addToFileList ( "json" , a , b ) , this } , script : function ( a , b , c , d ) { return "undefined" == typeof c && ( c = ! 1 ) , c !== ! 1 && "undefined" == typeof d && ( d = c ) , this . addToFileList ( "script" , a , b , { callback : c , callbackContext : d } ) , this } , binary : function ( a , b , c , d ) { return "undefined" == typeof c && ( c = ! 1 ) , c !== ! 1 && "undefined" == typeof d && ( d = c ) , this . addToFileList ( "binary" , a , b , { callback : c , callbackContext : d } ) , this } , spritesheet : function ( a , b , c , d , e , f , g ) { return "undefined" == typeof e && ( e = - 1 ) , "undefined" == typeof f && ( f = 0 ) , "undefined" == typeof g && ( g = 0 ) , this . addToFileList ( "spritesheet" , a , b , { frameWidth : c , frameHeight : d , frameMax : e , margin : f , spacing : g } ) , this } , audio : function ( a , b , c ) { return "undefined" == typeof c && ( c = ! 0 ) , this . addToFileList ( "audio" , a , b , { buffer : null , autoDecode : c } ) , this } , tilemap : function ( a , c , d , e ) { if ( "undefined" == typeof c && ( c = null ) , "undefined" == typeof d && ( d = null ) , "undefined" == typeof e && ( e = b . Tilemap . CSV ) , null == c && null == d ) return console . warn ( "Phaser.Loader.tilemap - Both url and data are null. One must be set." ) , this ; if ( d ) { switch ( e ) { case b . Tilemap . CSV : break ; case b . Tilemap . TILED _JSON : "string" == typeof d && ( d = JSON . parse ( d ) ) } this . game . cache . add
} , start : function ( a , b , c , d ) { "number" != typeof a && ( a = 0 ) , "number" != typeof b && ( b = 0 ) , c = c || "rgb(255,255,255)" , "undefined" == typeof d && ( d = 0 ) , this . currentX = a , this . currentY = b , this . currentColor = c , this . currentAlpha = this . context . globalAlpha , this . columnWidth = d , this . sprite && ( this . dirty = ! 0 ) , this . context . save ( ) , this . context . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) , this . context . strokeStyle = c , this . context . fillStyle = c , this . context . font = this . font , this . context . globalAlpha = 1 } , stop : function ( ) { this . context . restore ( ) , this . context . globalAlpha = this . currentAlpha , this . sprite && PIXI . updateWebGLTexture ( this . baseTexture , this . game . renderer . gl ) } , line : function ( ) { for ( var a = this . currentX , b = 0 ; b < arguments . length ; b ++ ) this . renderShadow && ( this . context . fillStyle = "rgb(0,0,0)" , this . context . fillText ( arguments [ b ] , a + 1 , this . currentY + 1 ) , this . context . fillStyle = this . currentColor ) , this . context . fillText ( arguments [ b ] , a , this . currentY ) , a += this . columnWidth ; this . currentY += this . lineHeight } , soundInfo : function ( a , b , c , d ) { this . start ( b , c , d ) , this . line ( "Sound: " + a . key + " Locked: " + a . game . sound . touchLocked ) , this . line ( "Is Ready?: " + this . game . cache . isSoundReady ( a . key ) + " Pending Playback: " + a . pendingPlayback ) , this . line ( "Decoded: " + a . isDecoded + " Decoding: " + a . isDecoding ) , this . line ( "Total Duration: " + a . totalDuration + " Playing: " + a . isPlaying ) , this . line ( "Time: " + a . currentTime ) , this . line ( "Volume: " + a . volume + " Muted: " + a . mute ) , this . line ( "WebAudio: " + a . usingWebAudio + " Audio: " + a . usingAudioTag ) , "" !== a . currentMarker && ( this . line ( "Marker: " + a . currentMarker + " Duration: " + a . duration + " (ms: " + a . durationMS + ")" ) , this . line ( "Start: " + a . markers [ a . currentMarker ] . start + " Stop: " + a . markers [ a . currentMarker ] . stop ) , this . line ( "Position: " + a . position ) ) , this . stop ( ) } , cameraInfo : function ( a , b , c , d ) { this . start ( b , c , d ) , this . line ( "Camera (" + a . width + " x " + a . height + ")" ) , this . line ( "X: " + a . x + " Y: " + a . y ) , this . line ( "Bounds x: " + a . bounds . x + " Y: " + a . bounds . y + " w: " + a . bounds . width + " h: " + a . bounds . height ) , this . line ( "View x: " + a . view . x + " Y: " + a . view . y + " w: " + a . view . width + " h: " + a . view . height ) , this . stop ( ) } , timer : function ( a , b , c , d ) { this . start ( b , c , d ) , this . line ( "Timer (running: " + a . running + " expired: " + a . expired + ")" ) , this . line ( "Next Tick: " + a . next + " Duration: " + a . duration ) , this . line ( "Paused: " + a . paused + " Length: " + a . length ) , this . stop ( ) } , pointer : function ( a , b , c , d , e ) { null != a && ( "undefined" == typeof b && ( b = ! 1 ) , c = c || "rgba(0,255,0,0.5)" , d = d || "rgba(255,0,0,0.5)" , ( b !== ! 0 || a . isUp !== ! 0 ) && ( this . start ( a . x , a . y - 100 , e ) , this . context . beginPath ( ) , this . context . arc ( a . x , a . y , a . circle . radius , 0 , 2 * Math . PI ) , this . context . fillStyle = a . active ? c : d , this . context . fill ( ) , this . context . closePath ( ) , this . context . beginPath ( ) , this . context . moveTo ( a . positionDown . x , a . positionDown . y ) , this . context . lineTo ( a . position . x , a . position . y ) , this . context . lineWidth = 2 , this . context . stroke ( ) , this . context . closePath ( ) , this . line ( "ID: " + a . id + " Active: " + a . active ) , this . line ( "World X: " + a . worldX + " World Y: " + a . worldY ) , this . line ( "Screen X: " + a . x + " Screen Y: " + a . y ) , this . line ( "Duration: " + a . duration + " ms" ) , this . line ( "is Down: " + a . isDown + " is Up: " + a . isUp ) , this . stop ( ) ) ) } , spriteInputInfo : function ( a , b , c , d ) { this . start ( b , c , d ) , this . line ( "Sprite Input: (" + a . width + " x " + a . height + ")" ) , this . line ( "x: " + a . input . pointerX ( ) . toFixed ( 1 ) + " y: " + a . input . pointerY ( ) . toFixed ( 1 ) ) , this . line ( "over: " + a . input . pointerOver ( ) + " duration: " + a . input . overDuration ( ) . toFixed ( 0 ) ) , this . line ( "down: " + a . input . pointerDown ( ) + " duration: " + a . input . downDuration ( ) . toFixed ( 0 ) ) , this . line ( "just over: " + a . input . justOver ( ) + " just out: " + a . input . justOut ( ) ) , this . stop ( ) } , key : function ( a , b , c , d ) { this . start ( b , c , d , 150 ) , this . line ( "Key:" , a . keyCode , "isDown:" , a . isDown ) , this . line ( "justPressed:" , a . justPressed ( ) , "justReleased:" , a . justReleased ( ) ) , this . line ( "Time Down:" , a . timeDown . toFixed ( 0 ) , "duration:" , a . duration . toFixed ( 0 ) ) , this . stop ( ) } , inputInfo : function ( a , b , c ) { this . start ( a , b , c ) , this . line ( "Input" ) , this . line ( "X: " + this . game . input . x + " Y: " + this . game . input . y ) , this . line ( "World X: " + this . game . input . worldX + " World Y: " + this . game . input . worldY ) , this . line ( "Scale X: " + this . game . input . scale . x . toFixed ( 1 ) + " Scale Y: " + this . game . input . scale . x . toFixed ( 1 ) ) , this . line ( "Screen X: " + this . game . input . activePointer
( a !== this . _sx || b !== this . _sy ) && ( this . width = this . sourceWidth * a , this . height = this . sourceHeight * b , this . halfWidth = Math . floor ( this . width / 2 ) , this . halfHeight = Math . floor ( this . height / 2 ) , this . _sx = a , this . _sy = b , this . center . setTo ( this . position . x + this . halfWidth , this . position . y + this . halfHeight ) , this . _reset = ! 0 ) } , preUpdate : function ( ) { this . enable && ( this . phase = 1 , this . wasTouching . none = this . touching . none , this . wasTouching . up = this . touching . up , this . wasTouching . down = this . touching . down , this . wasTouching . left = this . touching . left , this . wasTouching . right = this . touching . right , this . touching . none = ! 0 , this . touching . up = ! 1 , this . touching . down = ! 1 , this . touching . left = ! 1 , this . touching . right = ! 1 , this . blocked . up = ! 1 , this . blocked . down = ! 1 , this . blocked . left = ! 1 , this . blocked . right = ! 1 , this . embedded = ! 1 , this . updateBounds ( ) , this . position . x = this . sprite . world . x - this . sprite . anchor . x * this . width + this . offset . x , this . position . y = this . sprite . world . y - this . sprite . anchor . y * this . height + this . offset . y , this . rotation = this . sprite . angle , this . preRotation = this . rotation , ( this . _reset || 1 === this . sprite . _cache [ 4 ] ) && ( this . prev . x = this . position . x , this . prev . y = this . position . y ) , this . moves && ( this . game . physics . arcade . updateMotion ( this ) , this . newVelocity . set ( this . velocity . x * this . game . time . physicsElapsed , this . velocity . y * this . game . time . physicsElapsed ) , this . position . x += this . newVelocity . x , this . position . y += this . newVelocity . y , ( this . position . x !== this . prev . x || this . position . y !== this . prev . y ) && ( this . speed = Math . sqrt ( this . velocity . x * this . velocity . x + this . velocity . y * this . velocity . y ) , this . angle = Math . atan2 ( this . velocity . y , this . velocity . x ) ) , this . collideWorldBounds && this . checkWorldBounds ( ) ) , this . _dx = this . deltaX ( ) , this . _dy = this . deltaY ( ) , this . _reset = ! 1 ) } , postUpdate : function ( ) { this . enable && 2 !== this . phase && ( this . phase = 2 , this . deltaX ( ) < 0 ? this . facing = b . LEFT : this . deltaX ( ) > 0 && ( this . facing = b . RIGHT ) , this . deltaY ( ) < 0 ? this . facing = b . UP : this . deltaY ( ) > 0 && ( this . facing = b . DOWN ) , this . moves && ( this . _dx = this . deltaX ( ) , this . _dy = this . deltaY ( ) , 0 !== this . deltaMax . x && 0 !== this . _dx && ( this . _dx < 0 && this . _dx < - this . deltaMax . x ? this . _dx = - this . deltaMax . x : this . _dx > 0 && this . _dx > this . deltaMax . x && ( this . _dx = this . deltaMax . x ) ) , 0 !== this . deltaMax . y && 0 !== this . _dy && ( this . _dy < 0 && this . _dy < - this . deltaMax . y ? this . _dy = - this . deltaMax . y : this . _dy > 0 && this . _dy > this . deltaMax . y && ( this . _dy = this . deltaMax . y ) ) , this . sprite . x += this . _dx , this . sprite . y += this . _dy ) , this . center . setTo ( this . position . x + this . halfWidth , this . position . y + this . halfHeight ) , this . allowRotation && ( this . sprite . angle += this . deltaZ ( ) ) , this . prev . x = this . position . x , this . prev . y = this . position . y ) } , destroy : function ( ) { this . sprite = null } , checkWorldBounds : function ( ) { this . position . x < this . game . physics . arcade . bounds . x && this . game . physics . arcade . checkCollision . left ? ( this . position . x = this . game . physics . arcade . bounds . x , this . velocity . x *= - this . bounce . x , this . blocked . left = ! 0 ) : this . right > this . game . physics . arcade . bounds . right && this . game . physics . arcade . checkCollision . right && ( this . position . x = this . game . physics . arcade . bounds . right - this . width , this . velocity . x *= - this . bounce . x , this . blocked . right = ! 0 ) , this . position . y < this . game . physics . arcade . bounds . y && this . game . physics . arcade . checkCollision . up ? ( this . position . y = this . game . physics . arcade . bounds . y , this . velocity . y *= - this . bounce . y , this . blocked . up = ! 0 ) : this . bottom > this . game . physics . arcade . bounds . bottom && this . game . physics . arcade . checkCollision . down && ( this . position . y = this . game . physics . arcade . bounds . bottom - this . height , this . velocity . y *= - this . bounce . y , this . blocked . down = ! 0 ) } , setSize : function ( a , b , c , d ) { "undefined" == typeof c && ( c = this . offset . x ) , "undefined" == typeof d && ( d = this . offset . y ) , this . sourceWidth = a , this . sourceHeight = b , this . width = this . sourceWidth * this . _sx , this . height = this . sourceHeight * this . _sy , this . halfWidth = Math . floor ( this . width / 2 ) , this . halfHeight = Math . floor ( this . height / 2 ) , this . offset . setTo ( c , d ) , this . center . setTo ( this . position . x + this . halfWidth , this . position . y + this . halfHeight ) } , reset : function ( a , b ) { this . velocity . set ( 0 ) , this . acceleration . set ( 0 ) , this . angularVelocity = 0 , this . angularAcceleration = 0 , this . position . x = a - this . sprite . anchor . x * this . width + this . offset . x , this . position . y = b - this . sprite . anchor . y * this . height + this . offset . y , this . prev . x = this . position
} , b . TilemapLayer . prototype . getTileXY = function ( a , b , c ) { return c . x = this . getTileX ( a ) , c . y = this . getTileY ( b ) , c } , b . TilemapLayer . prototype . getRayCastTiles = function ( a , b , c , d ) { ( "undefined" == typeof b || null === b ) && ( b = this . rayStepRate ) , "undefined" == typeof c && ( c = ! 1 ) , "undefined" == typeof d && ( d = ! 1 ) ; var e = this . getTiles ( a . x , a . y , a . width , a . height , c , d ) ; if ( 0 === e . length ) return [ ] ; for ( var f = a . coordinatesOnLine ( b ) , g = f . length , h = [ ] , i = 0 ; i < e . length ; i ++ ) for ( var j = 0 ; g > j ; j ++ ) if ( e [ i ] . containsPoint ( f [ j ] [ 0 ] , f [ j ] [ 1 ] ) ) { h . push ( e [ i ] ) ; break } return h } , b . TilemapLayer . prototype . getTiles = function ( a , b , c , d , e , f ) { "undefined" == typeof e && ( e = ! 1 ) , "undefined" == typeof f && ( f = ! 1 ) , a = this . _fixX ( a ) , b = this . _fixY ( b ) , c > this . layer . widthInPixels && ( c = this . layer . widthInPixels ) , d > this . layer . heightInPixels && ( d = this . layer . heightInPixels ) , this . _mc . tx = this . game . math . snapToFloor ( a , this . _mc . cw ) / this . _mc . cw , this . _mc . ty = this . game . math . snapToFloor ( b , this . _mc . ch ) / this . _mc . ch , this . _mc . tw = ( this . game . math . snapToCeil ( c , this . _mc . cw ) + this . _mc . cw ) / this . _mc . cw , this . _mc . th = ( this . game . math . snapToCeil ( d , this . _mc . ch ) + this . _mc . ch ) / this . _mc . ch , this . _results . length = 0 ; for ( var g = this . _mc . ty ; g < this . _mc . ty + this . _mc . th ; g ++ ) for ( var h = this . _mc . tx ; h < this . _mc . tx + this . _mc . tw ; h ++ ) this . layer . data [ g ] && this . layer . data [ g ] [ h ] && ( ! e && ! f || this . layer . data [ g ] [ h ] . isInteresting ( e , f ) ) && this . _results . push ( this . layer . data [ g ] [ h ] ) ; return this . _results } , b . TilemapLayer . prototype . updateMax = function ( ) { this . _mc . maxX = this . game . math . ceil ( this . canvas . width / this . map . tileWidth ) + 1 , this . _mc . maxY = this . game . math . ceil ( this . canvas . height / this . map . tileHeight ) + 1 , this . dirty = ! 0 } , b . TilemapLayer . prototype . render = function ( ) { if ( this . layer . dirty && ( this . dirty = ! 0 ) , this . dirty && this . visible ) { this . _mc . prevX = this . _mc . dx , this . _mc . prevY = this . _mc . dy , this . _mc . dx = - ( this . _mc . x - this . _mc . startX * this . map . tileWidth ) , this . _mc . dy = - ( this . _mc . y - this . _mc . startY * this . map . tileHeight ) , this . _mc . tx = this . _mc . dx , this . _mc . ty = this . _mc . dy , this . context . clearRect ( 0 , 0 , this . canvas . width , this . canvas . height ) , this . context . fillStyle = this . tileColor ; var a , c ; this . debug && ( this . context . globalAlpha = this . debugAlpha ) ; for ( var d = this . _mc . startY , e = this . _mc . startY + this . _mc . maxY ; e > d ; d ++ ) { if ( this . _column = null , 0 > d && this . wrap ? this . _column = this . layer . data [ d + this . map . height ] : d >= this . map . height && this . wrap ? this . _column = this . layer . data [ d - this . map . height ] : this . layer . data [ d ] && ( this . _column = this . layer . data [ d ] ) , this . _column ) for ( var f = this . _mc . startX , g = this . _mc . startX + this . _mc . maxX ; g > f ; f ++ ) { var a = null ; 0 > f && this . wrap ? a = this . _column [ f + this . map . width ] : f >= this . map . width && this . wrap ? a = this . _column [ f - this . map . width ] : this . _column [ f ] && ( a = this . _column [ f ] ) , a && a . index > - 1 && ( c = this . map . tilesets [ this . map . tiles [ a . index ] [ 2 ] ] , this . debug === ! 1 && a . alpha !== this . context . globalAlpha && ( this . context . globalAlpha = a . alpha ) , c . draw ( this . context , Math . floor ( this . _mc . tx ) , Math . floor ( this . _mc . ty ) , a . index ) , a . debug && ( this . context . fillStyle = "rgba(0, 255, 0, 0.4)" , this . context . fillRect ( Math . floor ( this . _mc . tx ) , Math . floor ( this . _mc . ty ) , this . map . tileWidth , this . map . tileHeight ) ) ) , this . _mc . tx += this . map . tileWidth } this . _mc . tx = this . _mc . dx , this . _mc . ty += this . map . tileHeight } return this . debug && ( this . context . globalAlpha = 1 , this . renderDebug ( ) ) , this . game . renderType === b . WEBGL && PIXI . updateWebGLTexture ( this . baseTexture , this . game . renderer . gl ) , this . dirty = ! 1 , this . layer . dirty = ! 1 , ! 0 } } , b . TilemapLayer . prototype . renderDebug = function ( ) { this . _mc . tx = this . _mc . dx , this . _mc . ty = this . _mc . dy , this . context . strokeStyle = this . debugColor , this . context . fillStyle = this . debugFillColor ; for ( var a = this . _mc . startY , b = this . _mc . startY + this . _mc . maxY ; b > a ; a ++ ) { if ( this . _column = null , 0 > a && this . wrap ? this . _column = this . layer . data [ a + this . map . height ] : a >= this . map . height && this . wrap ? this . _column = this . layer . data [ a - this . map . height ] : this . layer . data [ a ] && ( this . _column = this . layer . data [ a ] ) , this . _column ) for ( var c = this . _mc . startX , d = this . _mc . startX + this . _mc . maxX ; d > c ; c ++ ) { var e = null ; 0 > c && this . wrap ? e = this . _column [ c + this . map . width ] : c >= this . map . width && this . wrap ? e = this . _column [ c - this . map . width ] : this . _column [ c ] && ( e = this . _column [ c ] ) , e && ( e . faceTop || e . faceBottom || e . faceLeft || e . faceRight ) && ( this . _mc . tx = Math . floor ( this . _mc . tx ) , this . debugFill && this . context . fill