2014-02-28 09:30:53 +00:00
/* Phaser (no libs) v2.0.0 - http://phaser.io - @photonstorm - (c) 2014 Photon Storm Ltd. */
2014-03-07 15:17:13 +00:00
( function ( ) { var a = this , b = b || { VERSION : "<%= version %>" , DEV _VERSION : "2.0" , GAMES : [ ] , AUTO : 0 , CANVAS : 1 , WEBGL : 2 , HEADLESS : 3 , 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 , BITMAPFONT : 18 , NONE : 0 , LEFT : 1 , RIGHT : 2 , UP : 3 , DOWN : 4 , DYNAMIC : 1 , STATIC : 2 , KINEMATIC : 4 , 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 . InteractionManager = function ( ) { } , b . Utils = { 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 = Array ( b + 1 - a . length ) . join ( c ) + a ; break ; case 3 : var f = Math . ceil ( ( e = b - a . length ) / 2 ) , g = e - f ; a = Array ( g + 1 ) . join ( c ) + a + Array ( f + 1 ) . join ( c ) ; break ; default : a += 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 && ! hasOwn . call ( a . constructor . prototype , "isPrototypeOf" ) ) return ! 1 } catch ( b ) { return ! 1 } return ! 0 } , extend : function ( ) { var a , c , d , e , f , g , h = arguments [ 0 ] || { } , i = 1 , j = arguments . length , k = ! 1 ; for ( "boolean" == typeof h && ( k = h , h = arguments [ 1 ] || { } , i = 2 ) , j === i && ( h = this , -- i ) ; j > i ; i ++ ) if ( null != ( a = arguments [ i ] ) ) for ( c in a ) d = h [ c ] , e = a [ c ] , h !== e && ( k && e && ( b . Utils . isPlainObject ( e ) || ( f = Array . isArray ( e ) ) ) ? ( f ? ( f = ! 1 , g = d && Array . isArray ( d ) ? d : [ ] ) : g = d && b . Utils . isPlainObject ( d ) ? d : { } , h [ c ] = b . Utils . extend ( k , g , e ) ) : void 0 !== e && ( h [ c ] = e ) ) ; return h } } , "function" != typeof Function . prototype . bind && ( Function . prototype . bind = function ( ) { var a = Array . prototype . slice ; return function ( b ) { function c ( ) { var f = e . concat ( a . call ( arguments ) ) ; d . apply ( this instanceof c ? this : b , f ) } var d = this , e = a . call ( arguments , 1 ) ; if ( "function" != typeof d ) throw new TypeError ; return c . prototype = function f ( a ) { return a && ( f . prototype = a ) , this instanceof f ? void 0 : new f } ( d . prototype ) , c } } ( ) ) , Array . isArray || ( Array . isArray = function ( a ) { return "[object Array]" == Object . prototype . toString . call ( a ) } ) , b . Circle = function ( a , b , c ) { a = a || 0 , b = b || 0 , c = c || 0 , this . x = a , this . y = b , this . _diameter = c , this . _radius = c > 0 ? . 5 * c : 0 } , b . Circle . prototype = { circumference : function ( ) { return 2 * Math . PI * this . _radius } , setTo : function ( a , b , c ) { return this . x = a , this . y = b , this . _diameter = c , this . _radius = . 5 * c , this } , copyFrom : function ( a ) { return this . setTo ( a . x , a . y , a . diameter ) } , copyTo : function ( a ) { return a . x = this . x , a . y = this . y , a . diameter = this . _diameter , a } , distance : function ( a , c ) { return "undefined" == typeof c && ( c = ! 1 ) , c ? b . Math . distanceRound ( this . x , this . y , a . x , a . y ) : b . Math . distance ( this . x , this . y , a . x , a . y ) } , clone : function ( a ) { return "undefined" == typeof a ? a = new b . Circle ( this . x , this . y , this . diameter ) : a . setTo ( this . x , this . y , this . diameter ) , a } , contains : function ( a , c ) { return b . Circle . contains ( this , a , c ) } , circumferencePoint : function ( a , c , d ) { return b . Circle . circumferencePoint ( this , a , c , d ) } , offset : function ( a , b ) { return this . x += a , this . y += b , this } , offsetPoint : function ( a ) { return this . offset ( a . x , a . y ) } , toString : function ( ) { return "[{Phaser.Circle (x=" + this . x + " y=" + this . y + " diameter=" + this . diameter + " radius=" + this . radius + ")}]" } } , b . Circle . prototype . constructor = b . Circle , Object . defineProperty ( b . Circle . prototype , "diameter" , { get : function ( ) { return this . _diameter } , set : function ( a ) { a > 0 && ( this . _diameter = a , this . _radius = . 5 * a ) } } ) , Object . defineProperty ( b . Circle . prototype , "radius" , { get : function ( ) { return this . _radius } , set : function ( a ) { a > 0 && ( this . _radius = a , this . _diameter = 2 * a ) } } ) , Object . defineProperty ( b . Circle . prototype , "left" , { get : function ( ) { return this . x - this . _radius } , set : function ( a ) { a > this . x ? ( this . _radius = 0 , this . _diameter = 0 ) : this . radius = this . x - a } } ) , Object . defineProperty ( b . Circle . prototype , "right" , { get : function ( ) { re
2014-03-10 11:08:07 +00:00
} , remove : function ( a ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) if ( this . plugins [ this . _p ] === a ) return a . destroy ( ) , this . plugins . splice ( this . _p , 1 ) , void this . _pluginsLength -- } , removeAll : function ( ) { for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . destroy ( ) ; this . plugins . length = 0 , this . _pluginsLength = 0 } , preUpdate : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . active && this . plugins [ this . _p ] . hasPreUpdate && this . plugins [ this . _p ] . preUpdate ( ) } , update : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . active && this . plugins [ this . _p ] . hasUpdate && this . plugins [ this . _p ] . update ( ) } , postUpdate : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . active && this . plugins [ this . _p ] . hasPostUpdate && this . plugins [ this . _p ] . postUpdate ( ) } , render : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . visible && this . plugins [ this . _p ] . hasRender && this . plugins [ this . _p ] . render ( ) } , postRender : function ( ) { if ( 0 !== this . _pluginsLength ) for ( this . _p = 0 ; this . _p < this . _pluginsLength ; this . _p ++ ) this . plugins [ this . _p ] . visible && this . plugins [ this . _p ] . hasPostRender && this . plugins [ this . _p ] . postRender ( ) } , destroy : function ( ) { this . plugins . length = 0 , this . _pluginsLength = 0 , this . game = null , this . _parent = null } } , b . PluginManager . prototype . constructor = b . PluginManager , b . Stage = function ( a , c , d ) { this . game = a , this . offset = new b . Point , PIXI . Stage . call ( this , 0 , ! 1 ) , this . name = "_stage_root" , this . interactive = ! 1 , this . disableVisibilityChange = ! 1 , this . checkOffsetInterval = 2500 , this . exists = ! 0 , this . currentRenderOrderID = 0 , this . _hiddenVar = "hidden" , this . _nextOffsetCheck = 0 , this . _backgroundColor , a . config ? this . parseConfig ( a . config ) : ( this . game . canvas = b . Canvas . create ( c , d ) , this . game . canvas . style [ "-webkit-full-screen" ] = "width: 100%; height: 100%" ) } , b . Stage . prototype = Object . create ( PIXI . Stage . prototype ) , b . Stage . prototype . constructor = b . Stage , b . Stage . prototype . preUpdate = function ( ) { this . currentRenderOrderID = 0 ; for ( var a = this . children . length , b = 0 ; a > b ; b ++ ) this . children [ b ] . preUpdate ( ) } , b . Stage . prototype . update = function ( ) { for ( var a = this . children . length ; a -- ; ) this . children [ a ] . update ( ) } , b . Stage . prototype . postUpdate = function ( ) { if ( this . game . world . camera . target ) { this . game . world . camera . target . postUpdate ( ) , this . game . world . camera . update ( ) ; for ( var a = this . children . length ; a -- ; ) this . children [ a ] !== this . game . world . camera . target && this . children [ a ] . postUpdate ( ) } else { this . game . world . camera . update ( ) ; for ( var a = this . children . length ; a -- ; ) this . children [ a ] . postUpdate ( ) } this . checkOffsetInterval !== ! 1 && this . game . time . now > this . _nextOffsetCheck && ( b . Canvas . getOffset ( this . game . canvas , this . offset ) , this . _nextOffsetCheck = this . game . time . now + this . checkOffsetInterval ) } , b . Stage . prototype . parseConfig = function ( a ) { this . game . canvas = a . canvasID ? b . Canvas . create ( this . game . width , this . game . height , a . canvasID ) : b . Canvas . create ( this . game . width , this . game . height ) , a . canvasStyle ? this . game . canvas . stlye = a . canvasStyle : this . game . canvas . style [ "-webkit-full-screen" ] = "width: 100%; height: 100%" , a . checkOffsetInterval && ( this . checkOffsetInterval = a . checkOffsetInterval ) , a . disableVisibilityChange && ( this . disableVisibilityChange = a . disableVisibilityChange ) , a . fullScreenScaleMode && ( this . fullScreenScaleMode = a . fullScreenScaleMode ) , a . scaleMode && ( this . scaleMode = a . scaleMode ) , a . backgroundColor && ( this . backgroundColor = a . backgroundColor ) } , b . Stage . prototype . boot = function ( ) { b . Canvas . getOffset ( this . game . canvas , this . offset ) , this . bounds = new b . Rectangle ( this . offset . x , this . offset . y , this . game . width , this . game . height ) ; var a = this ; this . _onChange = function ( b ) { return a . visibilityChange ( b ) } , b . Canvas . setUserSelect ( this . game . canvas , "none" ) , b . Canvas . setTouchAction ( this . game . canvas , "none" ) , this . checkVisibility ( ) } , b . Stage . prototype . checkVisibility = function ( ) { this . _hiddenVar = void 0 != document . webkitHidden ? "webkitvisibilitychange" : void 0 != document . mozHidden ? "mozvisibilitychange" : void 0 != document . msHidden ? "msvisibilitychange" : void 0 != document . hidden ? " visibil
} } ) , b . Input = function ( a ) { this . game = a , this . hitCanvas = null , this . hitContext = null , this . moveCallback = null , this . moveCallbackContext = this , this . pollRate = 0 , this . disabled = ! 1 , this . multiInputOverride = b . Input . MOUSE _TOUCH _COMBINE , this . position = null , this . speed = null , this . circle = null , this . scale = null , this . maxPointers = 10 , this . currentPointers = 0 , this . tapRate = 200 , this . doubleTapRate = 300 , this . holdRate = 2e3 , this . justPressedRate = 200 , this . justReleasedRate = 200 , this . recordPointerHistory = ! 1 , this . recordRate = 100 , this . recordLimit = 100 , this . pointer1 = null , this . pointer2 = null , this . pointer3 = null , this . pointer4 = null , this . pointer5 = null , this . pointer6 = null , this . pointer7 = null , this . pointer8 = null , this . pointer9 = null , this . pointer10 = null , this . activePointer = null , this . mousePointer = null , this . mouse = null , this . keyboard = null , this . touch = null , this . mspointer = null , this . gamepad = null , this . gestures = null , this . onDown = null , this . onUp = null , this . onTap = null , this . onHold = null , this . interactiveItems = new b . LinkedList , this . _localPoint = new b . Point , this . _pollCounter = 0 , this . _oldPosition = null , this . _x = 0 , this . _y = 0 } , b . Input . MOUSE _OVERRIDES _TOUCH = 0 , b . Input . TOUCH _OVERRIDES _MOUSE = 1 , b . Input . MOUSE _TOUCH _COMBINE = 2 , b . Input . prototype = { boot : function ( ) { this . mousePointer = new b . Pointer ( this . game , 0 ) , this . pointer1 = new b . Pointer ( this . game , 1 ) , this . pointer2 = new b . Pointer ( this . game , 2 ) , this . mouse = new b . Mouse ( this . game ) , this . keyboard = new b . Keyboard ( this . game ) , this . touch = new b . Touch ( this . game ) , this . mspointer = new b . MSPointer ( this . game ) , this . gamepad = new b . Gamepad ( this . game ) , this . gestures = new b . Gestures ( this . game ) , this . onDown = new b . Signal , this . onUp = new b . Signal , this . onTap = new b . Signal , this . onHold = new b . Signal , this . scale = new b . Point ( 1 , 1 ) , this . speed = new b . Point , this . position = new b . Point , this . _oldPosition = new b . Point , this . circle = new b . Circle ( 0 , 0 , 44 ) , this . activePointer = this . mousePointer , this . currentPointers = 0 , this . hitCanvas = document . createElement ( "canvas" ) , this . hitCanvas . width = 1 , this . hitCanvas . height = 1 , this . hitContext = this . hitCanvas . getContext ( "2d" ) , this . mouse . start ( ) , this . keyboard . start ( ) , this . touch . start ( ) , this . mspointer . start ( ) , this . mousePointer . active = ! 0 } , destroy : function ( ) { this . mouse . stop ( ) , this . keyboard . stop ( ) , this . touch . stop ( ) , this . mspointer . stop ( ) , this . gamepad . stop ( ) , this . gestures . stop ( ) , this . moveCallback = null } , setMoveCallback : function ( a , b ) { this . moveCallback = a , this . moveCallbackContext = b } , addPointer : function ( ) { for ( var a = 0 , c = 10 ; c > 0 ; c -- ) null === this [ "pointer" + c ] && ( a = c ) ; return 0 === a ? ( console . warn ( "You can only have 10 Pointer objects" ) , null ) : ( this [ "pointer" + a ] = new b . Pointer ( this . game , a ) , this [ "pointer" + a ] ) } , update : function ( ) { return this . keyboard . update ( ) , this . pollRate > 0 && this . _pollCounter < this . pollRate ? void this . _pollCounter ++ : ( this . speed . x = this . position . x - this . _oldPosition . x , this . speed . y = this . position . y - this . _oldPosition . y , this . _oldPosition . copyFrom ( this . position ) , this . mousePointer . update ( ) , this . gamepad . active && this . gamepad . update ( ) , this . pointer1 . update ( ) , this . pointer2 . update ( ) , this . pointer3 && this . pointer3 . update ( ) , this . pointer4 && this . pointer4 . update ( ) , this . pointer5 && this . pointer5 . update ( ) , this . pointer6 && this . pointer6 . update ( ) , this . pointer7 && this . pointer7 . update ( ) , this . pointer8 && this . pointer8 . update ( ) , this . pointer9 && this . pointer9 . update ( ) , this . pointer10 && this . pointer10 . update ( ) , this . _pollCounter = 0 , void ( this . gestures . active && this . gestures . update ( ) ) ) } , reset : function ( a ) { if ( this . game . isBooted !== ! 1 ) { "undefined" == typeof a && ( a = ! 1 ) , this . keyboard . reset ( ) , this . mousePointer . reset ( ) , this . gamepad . reset ( ) ; for ( var c = 1 ; 10 >= c ; c ++ ) this [ "pointer" + c ] && this [ "pointer" + c ] . reset ( ) ; this . currentPointers = 0 , "none" !== this . game . canvas . style . cursor && ( this . game . canvas . style . cursor = "inherit" ) , a === ! 0 && ( this . onDown . dispose ( ) , this . onUp . dispose ( ) , this . onTap . dispose ( ) , this . onHold . dispose ( ) , this . onDown = new b . Signal , this . onUp = new b . Signal , this . onTap = new b . Signal , this . onHold = new b . Signal , this . interactiveItems . callAll ( "reset" ) ) , this . _pollCounter = 0 } } , resetSpeed : function ( a , b ) { this . _oldPosition . setTo ( a , b ) , this . speed . setTo ( 0 , 0 ) } , startPointer : function ( a ) { if ( this . maxPointers < 10 && this . totalActivePointers == this . maxPointers ) return null ; if ( this . pointer1 . active === ! 1 ) return this . po
} } ) , Object . defineProperty ( b . Gamepad . prototype , "supported" , { get : function ( ) { return this . _gamepadSupportAvailable } } ) , Object . defineProperty ( b . Gamepad . prototype , "padsConnected" , { get : function ( ) { return this . _rawPads . length } } ) , Object . defineProperty ( b . Gamepad . prototype , "pad1" , { get : function ( ) { return this . _gamepads [ 0 ] } } ) , Object . defineProperty ( b . Gamepad . prototype , "pad2" , { get : function ( ) { return this . _gamepads [ 1 ] } } ) , Object . defineProperty ( b . Gamepad . prototype , "pad3" , { get : function ( ) { return this . _gamepads [ 2 ] } } ) , Object . defineProperty ( b . Gamepad . prototype , "pad4" , { get : function ( ) { return this . _gamepads [ 3 ] } } ) , b . Gamepad . BUTTON _0 = 0 , b . Gamepad . BUTTON _1 = 1 , b . Gamepad . BUTTON _2 = 2 , b . Gamepad . BUTTON _3 = 3 , b . Gamepad . BUTTON _4 = 4 , b . Gamepad . BUTTON _5 = 5 , b . Gamepad . BUTTON _6 = 6 , b . Gamepad . BUTTON _7 = 7 , b . Gamepad . BUTTON _8 = 8 , b . Gamepad . BUTTON _9 = 9 , b . Gamepad . BUTTON _10 = 10 , b . Gamepad . BUTTON _11 = 11 , b . Gamepad . BUTTON _12 = 12 , b . Gamepad . BUTTON _13 = 13 , b . Gamepad . BUTTON _14 = 14 , b . Gamepad . BUTTON _15 = 15 , b . Gamepad . AXIS _0 = 0 , b . Gamepad . AXIS _1 = 1 , b . Gamepad . AXIS _2 = 2 , b . Gamepad . AXIS _3 = 3 , b . Gamepad . AXIS _4 = 4 , b . Gamepad . AXIS _5 = 5 , b . Gamepad . AXIS _6 = 6 , b . Gamepad . AXIS _7 = 7 , b . Gamepad . AXIS _8 = 8 , b . Gamepad . AXIS _9 = 9 , b . Gamepad . XBOX360 _A = 0 , b . Gamepad . XBOX360 _B = 1 , b . Gamepad . XBOX360 _X = 2 , b . Gamepad . XBOX360 _Y = 3 , b . Gamepad . XBOX360 _LEFT _BUMPER = 4 , b . Gamepad . XBOX360 _RIGHT _BUMPER = 5 , b . Gamepad . XBOX360 _LEFT _TRIGGER = 6 , b . Gamepad . XBOX360 _RIGHT _TRIGGER = 7 , b . Gamepad . XBOX360 _BACK = 8 , b . Gamepad . XBOX360 _START = 9 , b . Gamepad . XBOX360 _STICK _LEFT _BUTTON = 10 , b . Gamepad . XBOX360 _STICK _RIGHT _BUTTON = 11 , b . Gamepad . XBOX360 _DPAD _LEFT = 14 , b . Gamepad . XBOX360 _DPAD _RIGHT = 15 , b . Gamepad . XBOX360 _DPAD _UP = 12 , b . Gamepad . XBOX360 _DPAD _DOWN = 13 , b . Gamepad . XBOX360 _STICK _LEFT _X = 0 , b . Gamepad . XBOX360 _STICK _LEFT _Y = 1 , b . Gamepad . XBOX360 _STICK _RIGHT _X = 2 , b . Gamepad . XBOX360 _STICK _RIGHT _Y = 3 , b . SinglePad = function ( a , b ) { this . game = a , this . _padParent = b , this . _index = null , this . _rawPad = null , this . _connected = ! 1 , this . _prevTimestamp = null , this . _rawButtons = [ ] , this . _buttons = [ ] , this . _axes = [ ] , this . _hotkeys = [ ] , this . callbackContext = this , this . onConnectCallback = null , this . onDisconnectCallback = null , this . onDownCallback = null , this . onUpCallback = null , this . onAxisCallback = null , this . onFloatCallback = null , this . deadZone = . 26 } , b . SinglePad . prototype = { addCallbacks : function ( a , b ) { "undefined" != typeof b && ( this . onConnectCallback = "function" == typeof b . onConnect ? b . onConnect : this . onConnectCallback , this . onDisconnectCallback = "function" == typeof b . onDisconnect ? b . onDisconnect : this . onDisconnectCallback , this . onDownCallback = "function" == typeof b . onDown ? b . onDown : this . onDownCallback , this . onUpCallback = "function" == typeof b . onUp ? b . onUp : this . onUpCallback , this . onAxisCallback = "function" == typeof b . onAxis ? b . onAxis : this . onAxisCallback , this . onFloatCallback = "function" == typeof b . onFloat ? b . onFloat : this . onFloatCallback ) } , addButton : function ( a ) { return this . _hotkeys [ a ] = new b . GamepadButton ( this . game , a ) , this . _hotkeys [ a ] } , pollStatus : function ( ) { if ( ! this . _rawPad . timestamp || this . _rawPad . timestamp != this . _prevTimestamp ) { for ( var a = 0 ; a < this . _rawPad . buttons . length ; a += 1 ) { var b = this . _rawPad . buttons [ a ] ; this . _rawButtons [ a ] !== b && ( 1 === b ? this . processButtonDown ( a , b ) : 0 === b ? this . processButtonUp ( a , b ) : this . processButtonFloat ( a , b ) , this . _rawButtons [ a ] = b ) } for ( var c = this . _rawPad . axes , d = 0 ; d < c . length ; d += 1 ) { var e = c [ d ] ; this . processAxisChange ( e > 0 && e > this . deadZone || 0 > e && e < - this . deadZone ? { axis : d , value : e } : { axis : d , value : 0 } ) } this . _prevTimestamp = this . _rawPad . timestamp } } , connect : function ( a ) { var b = ! this . _connected ; this . _index = a . index , this . _connected = ! 0 , this . _rawPad = a , this . _rawButtons = a . buttons , this . _axes = a . axes , b && this . _padParent . onConnectCallback && this . _padParent . onConnectCallback . call ( this . _padParent . callbackContext , this . _index ) , b && this . onConnectCallback && this . onConnectCallback . call ( this . callbackContext ) } , disconnect : function ( ) { var a = this . _connected ; this . _connected = ! 1 , this . _rawPad = void 0 , this . _rawButtons = [ ] , this . _buttons = [ ] ; var b = this . _index ; this . _index = null , a && this . _padParent . onDisconnectCallback && this . _padParent . onDisconnectCallback . call ( this . _padParent . callbackContext , b ) , a && this . onDisconnectCallback && this . onDisconnectCallback . call ( this . callbackContext ) } , processAxisChange : function ( a ) { this . game . input . disabled || this . ga
} , setPixel : function ( a , b , c , d , e ) { this . setPixel32 ( a , b , c , d , e , 255 ) } , getPixel : function ( a , b ) { return a >= 0 && a <= this . width && b >= 0 && b <= this . height ? this . data32 [ b * this . width + a ] : void 0 } , getPixel32 : function ( a , b ) { return a >= 0 && a <= this . width && b >= 0 && b <= this . height ? this . data32 [ b * this . width + a ] : void 0 } , getPixels : function ( a ) { return this . context . getImageData ( a . x , a . y , a . width , a . height ) } , copyPixels : function ( a , b , c , d ) { "string" == typeof a && ( a = this . game . cache . getImage ( a ) ) , a && this . context . drawImage ( a , b . x , b . y , b . width , b . height , c , d , b . width , b . height ) } , draw : function ( a , b , c ) { "string" == typeof a && ( a = this . game . cache . getImage ( a ) ) , a && this . context . drawImage ( a , 0 , 0 , a . width , a . height , b , c , a . width , a . height ) } , alphaMask : function ( a , b ) { var c = this . context . globalCompositeOperation ; "string" == typeof b && ( b = this . game . cache . getImage ( b ) ) , b && this . context . drawImage ( b , 0 , 0 ) , this . context . globalCompositeOperation = "source-atop" , "string" == typeof a && ( a = this . game . cache . getImage ( a ) ) , a && this . context . drawImage ( a , 0 , 0 ) , this . context . globalCompositeOperation = c } , render : function ( ) { this . _dirty && ( this . game . renderType === b . WEBGL && PIXI . updateWebGLTexture ( this . baseTexture , this . game . renderer . gl ) , this . _dirty = ! 1 ) } } , b . BitmapData . prototype . constructor = b . BitmapData , b . Sprite = function ( a , c , d , e , f ) { c = c || 0 , d = d || 0 , e = e || null , f = f || null , this . game = a , this . name = "" , this . type = b . SPRITE , this . events = new b . Events ( this ) , this . animations = new b . AnimationManager ( this ) , this . key = e , this . _frame = 0 , this . _frameName = "" , PIXI . Sprite . call ( this , PIXI . TextureCache . _ _default ) , this . loadTexture ( e , f ) , this . position . set ( c , d ) , this . world = new b . Point ( c , d ) , this . autoCull = ! 1 , this . input = null , this . body = null , this . health = 1 , this . lifespan = 0 , this . checkWorldBounds = ! 1 , this . outOfBoundsKill = ! 1 , this . debug = ! 1 , this . cameraOffset = new b . Point , this . _cache = new Int16Array ( [ 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 ] ) , this . _bounds = new b . Rectangle } , b . Sprite . prototype = Object . create ( PIXI . Sprite . prototype ) , b . Sprite . prototype . constructor = b . Sprite , b . Sprite . prototype . preUpdate = function ( ) { if ( 1 === this . _cache [ 4 ] ) 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 . _cache [ 4 ] = 0 , ! 1 ; if ( this . _cache [ 0 ] = this . world . x , this . _cache [ 1 ] = this . world . y , this . _cache [ 2 ] = this . rotation , ! this . exists || ! this . parent . exists ) return this . _cache [ 3 ] = - 1 , ! 1 ; if ( this . lifespan > 0 && ( this . lifespan -= this . game . time . elapsed , this . lifespan <= 0 ) ) return this . kill ( ) , ! 1 ; if ( ( this . autoCull || this . checkWorldBounds ) && this . _bounds . copyFrom ( this . getBounds ( ) ) , this . autoCull && ( this . renderable = this . game . world . camera . screenView . intersects ( this . _bounds ) ) , this . checkWorldBounds ) if ( 1 === this . _cache [ 5 ] && this . game . world . bounds . intersects ( this . _bounds ) ) this . _cache [ 5 ] = 0 ; else if ( 0 === this . _cache [ 5 ] && ! this . game . world . bounds . intersects ( this . _bounds ) && ( this . _cache [ 5 ] = 1 , this . events . onOutOfBounds . dispatch ( this ) , this . outOfBoundsKill ) ) return this . kill ( ) , ! 1 ; this . world . setTo ( this . game . camera . x + this . worldTransform . tx , this . game . camera . y + this . worldTransform . ty ) , this . visible && ( this . _cache [ 3 ] = this . game . stage . currentRenderOrderID ++ ) , this . animations . update ( ) , this . exists && this . body && this . body . preUpdate ( ) ; for ( var a = 0 , b = this . children . length ; b > a ; a ++ ) this . children [ a ] . preUpdate ( ) ; return ! 0 } , b . Sprite . prototype . update = function ( ) { } , b . Sprite . prototype . postUpdate = function ( ) { this . key instanceof b . BitmapData && this . key . _dirty && this . key . render ( ) , this . exists && this . body && this . body . postUpdate ( ) , 1 === this . _cache [ 7 ] && ( this . position . x = ( this . game . camera . view . x + this . cameraOffset . x ) / this . game . camera . scale . x , this . position . y = ( this . game . camera . view . y + this . cameraOffset . y ) / this . game . camera . scale . y ) ; for ( var a = 0 , c = this . children . length ; c > a ; a ++ ) this . children [ a ] . postUpdate ( ) } , b . Sprite . prototype . loadTexture = function ( a , c ) { return c = c || 0 , a instanceof b . RenderTexture ? ( this . key = a . key , void this . setTexture ( a ) ) : a instanceof b . BitmapData ? ( this . key = a . key , void this . setTexture ( a . texture ) ) : a instanceof PIXI . Texture ? ( this . key = a , void this . setTexture ( a ) ) : null === a || "undefined" == typeof a ? ( this . key = "__default" , void this . setTexture ( PIXI . TextureCache [ thi
} , b . Button . prototype . setSounds = function ( a , b , c , d , e , f , g , h ) { this . setOverSound ( a , b ) , this . setOutSound ( e , f ) , this . setDownSound ( c , d ) , this . setUpSound ( g , h ) } , b . Button . prototype . setOverSound = function ( a , c ) { this . onOverSound = null , this . onOverSoundMarker = "" , a instanceof b . Sound && ( this . onOverSound = a ) , "string" == typeof c && ( this . onOverSoundMarker = c ) } , b . Button . prototype . setOutSound = function ( a , c ) { this . onOutSound = null , this . onOutSoundMarker = "" , a instanceof b . Sound && ( this . onOutSound = a ) , "string" == typeof c && ( this . onOutSoundMarker = c ) } , b . Button . prototype . setDownSound = function ( a , c ) { this . onDownSound = null , this . onDownSoundMarker = "" , a instanceof b . Sound && ( this . onDownSound = a ) , "string" == typeof c && ( this . onDownSoundMarker = c ) } , b . Button . prototype . setUpSound = function ( a , c ) { this . onUpSound = null , this . onUpSoundMarker = "" , a instanceof b . Sound && ( this . onUpSound = a ) , "string" == typeof c && ( this . onUpSoundMarker = c ) } , b . Button . prototype . onInputOverHandler = function ( a , b ) { this . freezeFrames === ! 1 && this . setState ( 1 ) , this . onOverSound && this . onOverSound . play ( this . onOverSoundMarker ) , this . onInputOver && this . onInputOver . dispatch ( this , b ) } , b . Button . prototype . onInputOutHandler = function ( a , b ) { this . freezeFrames === ! 1 && this . setState ( 2 ) , this . onOutSound && this . onOutSound . play ( this . onOutSoundMarker ) , this . onInputOut && this . onInputOut . dispatch ( this , b ) } , b . Button . prototype . onInputDownHandler = function ( a , b ) { this . freezeFrames === ! 1 && this . setState ( 3 ) , this . onDownSound && this . onDownSound . play ( this . onDownSoundMarker ) , this . onInputDown && this . onInputDown . dispatch ( this , b ) } , b . Button . prototype . onInputUpHandler = function ( a , b , c ) { this . onUpSound && this . onUpSound . play ( this . onUpSoundMarker ) , this . onInputUp && this . onInputUp . dispatch ( this , b , c ) , this . freezeFrames || this . setState ( this . forceOut ? 2 : this . _onUpFrameName || this . _onUpFrameID ? 4 : c ? 1 : 2 ) } , b . Button . prototype . setState = function ( a ) { 1 === a ? null != this . _onOverFrameName ? this . frameName = this . _onOverFrameName : null != this . _onOverFrameID && ( this . frame = this . _onOverFrameID ) : 2 === a ? null != this . _onOutFrameName ? this . frameName = this . _onOutFrameName : null != this . _onOutFrameID && ( this . frame = this . _onOutFrameID ) : 3 === a ? null != this . _onDownFrameName ? this . frameName = this . _onDownFrameName : null != this . _onDownFrameID && ( this . frame = this . _onDownFrameID ) : 4 === a && ( null != this . _onUpFrameName ? this . frameName = this . _onUpFrameName : null != this . _onUpFrameID && ( this . frame = this . _onUpFrameID ) ) } , b . Graphics = function ( a , c , d ) { c = c || 0 , d = d || 0 , this . game = a , this . exists = ! 0 , this . name = "" , this . type = b . GRAPHICS , this . world = new b . Point ( c , d ) , this . cameraOffset = new b . Point , PIXI . Graphics . call ( this ) , this . position . set ( c , d ) , this . _cache = new Int16Array ( [ 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 ] ) } , b . Graphics . prototype = Object . create ( PIXI . Graphics . prototype ) , b . Graphics . prototype . constructor = b . Graphics , b . Graphics . prototype . preUpdate = function ( ) { return this . _cache [ 0 ] = this . world . x , this . _cache [ 1 ] = this . world . y , this . _cache [ 2 ] = this . rotation , this . exists && this . parent . exists ? ( this . autoCull && ( this . renderable = this . game . world . camera . screenView . intersects ( this . getBounds ( ) ) ) , this . world . setTo ( this . game . camera . x + this . worldTransform [ 2 ] , this . game . camera . y + this . worldTransform [ 5 ] ) , this . visible && ( this . _cache [ 3 ] = this . game . stage . currentRenderOrderID ++ ) , ! 0 ) : ( this . renderOrderID = - 1 , ! 1 ) } , b . Graphics . prototype . update = function ( ) { } , b . Graphics . prototype . postUpdate = function ( ) { 1 === this . _cache [ 7 ] && ( this . position . x = ( this . game . camera . view . x + this . cameraOffset . x ) / this . game . camera . scale . x , this . position . y = ( this . game . camera . view . y + this . cameraOffset . y ) / this . game . camera . scale . y ) } , b . Graphics . prototype . destroy = function ( a ) { "undefined" == typeof a && ( a = ! 0 ) , this . clear ( ) , this . parent && ( this . parent instanceof b . Group ? this . parent . remove ( this ) : this . parent . removeChild ( this ) ) ; var c = this . children . length ; if ( a ) for ( ; c -- ; ) this . children [ c ] . destroy ( a ) ; else for ( ; c -- ; ) this . removeChild ( this . children [ c ] ) ; this . exists = ! 1 , this . visible = ! 1 , this . game = null } , b . Graphics . prototype . drawPolygon = function ( a ) { this . moveTo ( a . points [ 0 ] . x , a . points [ 0 ] . y ) ; for ( var b = 1 ; b < a . points . length ; b += 1 ) this . lineTo ( a . points [ b ] . x , a . points [ b ] . y ) ; this . lineTo ( a . points [ 0 ] . x , a . points [ 0 ] . y ) } , Object . defineProperty ( b . Graphics . prototype , "angle" , { get : function ( ) { return b . Math . radToDeg ( this . rotation ) } , set : function ( a ) {
for ( var a = 0 , b = this . _tweens . length ; b > a ; ) this . _tweens [ a ] . update ( this . game . time . now ) ? a ++ : ( this . _tweens . splice ( a , 1 ) , b -- ) ; return this . _add . length > 0 && ( this . _tweens = this . _tweens . concat ( this . _add ) , this . _add . length = 0 ) , ! 0 } , isTweening : function ( a ) { return this . _tweens . some ( function ( b ) { return b . _object === a } ) } , _pauseAll : function ( ) { for ( var a = this . _tweens . length - 1 ; a >= 0 ; a -- ) this . _tweens [ a ] . _pause ( ) } , _resumeAll : function ( ) { for ( var a = this . _tweens . length - 1 ; a >= 0 ; a -- ) this . _tweens [ a ] . _resume ( ) } , pauseAll : function ( ) { for ( var a = this . _tweens . length - 1 ; a >= 0 ; a -- ) this . _tweens [ a ] . pause ( ) } , resumeAll : function ( ) { for ( var a = this . _tweens . length - 1 ; a >= 0 ; a -- ) this . _tweens [ a ] . resume ( ! 0 ) } } , b . TweenManager . prototype . constructor = b . TweenManager , b . Tween = function ( a , c , d ) { this . _object = a , this . game = c , this . _manager = d , this . _valuesStart = { } , this . _valuesEnd = { } , this . _valuesStartRepeat = { } , this . _duration = 1e3 , this . _repeat = 0 , this . _yoyo = ! 1 , this . _reversed = ! 1 , this . _delayTime = 0 , this . _startTime = null , this . _easingFunction = b . Easing . Linear . None , this . _interpolationFunction = b . Math . linearInterpolation , this . _chainedTweens = [ ] , this . _onStartCallbackFired = ! 1 , this . _onUpdateCallback = null , this . _onUpdateCallbackContext = null , this . _paused = ! 1 , this . _pausedTime = 0 , this . _codePaused = ! 1 , this . pendingDelete = ! 1 , this . onStart = new b . Signal , this . onLoop = new b . Signal , this . onComplete = new b . Signal , this . isRunning = ! 1 } , b . Tween . prototype = { to : function ( a , b , c , d , e , f , g ) { b = b || 1e3 , c = c || null , d = d || ! 1 , e = e || 0 , f = f || 0 , g = g || ! 1 ; var h ; return this . _parent ? ( h = this . _manager . create ( this . _object ) , this . _lastChild . chain ( h ) , this . _lastChild = h ) : ( h = this , this . _parent = this , this . _lastChild = this ) , h . _repeat = f , h . _duration = b , h . _valuesEnd = a , null !== c && ( h . _easingFunction = c ) , e > 0 && ( h . _delayTime = e ) , h . _yoyo = g , d ? this . start ( ) : this } , start : function ( ) { if ( null !== this . game && null !== this . _object ) { this . _manager . add ( this ) , this . isRunning = ! 0 , this . _onStartCallbackFired = ! 1 , this . _startTime = this . game . time . now + this . _delayTime ; for ( var a in this . _valuesEnd ) { if ( Array . isArray ( this . _valuesEnd [ a ] ) ) { if ( 0 === this . _valuesEnd [ a ] . length ) continue ; this . _valuesEnd [ a ] = [ this . _object [ a ] ] . concat ( this . _valuesEnd [ a ] ) } this . _valuesStart [ a ] = this . _object [ a ] , Array . isArray ( this . _valuesStart [ a ] ) || ( this . _valuesStart [ a ] *= 1 ) , this . _valuesStartRepeat [ a ] = this . _valuesStart [ a ] || 0 } return this } } , generateData : function ( a , b ) { if ( null === this . game || null === this . _object ) return null ; this . _startTime = 0 ; for ( var c in this . _valuesEnd ) { if ( Array . isArray ( this . _valuesEnd [ c ] ) ) { if ( 0 === this . _valuesEnd [ c ] . length ) continue ; this . _valuesEnd [ c ] = [ this . _object [ c ] ] . concat ( this . _valuesEnd [ c ] ) } this . _valuesStart [ c ] = this . _object [ c ] , Array . isArray ( this . _valuesStart [ c ] ) || ( this . _valuesStart [ c ] *= 1 ) , this . _valuesStartRepeat [ c ] = this . _valuesStart [ c ] || 0 } for ( var d = 0 , e = a * ( this . _duration / 1e3 ) , f = this . _duration / e , g = [ ] ; e -- ; ) { var c , h = ( d - this . _startTime ) / this . _duration ; h = h > 1 ? 1 : h ; var i = this . _easingFunction ( h ) , j = { } ; for ( c in this . _valuesEnd ) { var k = this . _valuesStart [ c ] || 0 , l = this . _valuesEnd [ c ] ; l instanceof Array ? j [ c ] = this . _interpolationFunction ( l , i ) : ( "string" == typeof l && ( l = k + parseFloat ( l , 10 ) ) , "number" == typeof l && ( j [ c ] = k + ( l - k ) * i ) ) } g . push ( j ) , d += f } if ( this . _yoyo ) { var m = g . slice ( ) ; m . reverse ( ) , g = g . concat ( m ) } return "undefined" != typeof b ? b = b . concat ( g ) : g } , stop : function ( ) { return this . isRunning = ! 1 , this . _onUpdateCallback = null , this . _manager . remove ( this ) , this } , delay : function ( a ) { return this . _delayTime = a , this } , repeat : function ( a ) { return this . _repeat = a , this } , yoyo : function ( a ) { return this . _yoyo = a , this } , easing : function ( a ) { return this . _easingFunction = a , this } , interpolation : function ( a ) { return this . _interpolationFunction = a , this } , chain : function ( ) { return this . _chainedTweens = arguments , this } , loop : function ( ) { return this . _lastChild . chain ( this ) , this } , onUpdateCallback : function ( a , b ) { return this . _onUpdateCallback = a , this . _onUpdateCallbackContext = b , this } , pause : function ( ) { this . _codePaused = ! 0 , this . _paused = ! 0 , this . _pausedTime = this . game . time . now } , _pause : function ( ) { this . _codePaused || ( this . _paused = ! 0 , this . _pausedTime = this . game . time . now ) } , resume : function ( ) { this . _paused && ( this . _paused = ! 1 , this . _codePaused = ! 1 , this . _startTime += this . game . time . now - this . _pausedTime ) } , _resume : function ( ) { this . _codePaused || ( this . _startTime += this . game . t
} , updateSound : function ( a , b , c ) { this . _sounds [ a ] && ( this . _sounds [ a ] [ b ] = c ) } , decodedSound : function ( a , b ) { this . _sounds [ a ] . data = b , this . _sounds [ a ] . decoded = ! 0 , this . _sounds [ a ] . isDecoding = ! 1 } , getCanvas : function ( a ) { return this . _canvases [ a ] ? this . _canvases [ a ] . canvas : void console . warn ( 'Phaser.Cache.getCanvas: Invalid key: "' + a + '"' ) } , getBitmapData : function ( a ) { return this . _bitmapDatas [ a ] ? this . _bitmapDatas [ a ] : void console . warn ( 'Phaser.Cache.getBitmapData: Invalid key: "' + a + '"' ) } , getBitmapFont : function ( a ) { return this . _bitmapFont [ a ] ? this . _bitmapFont [ a ] : void console . warn ( 'Phaser.Cache.getBitmapFont: Invalid key: "' + a + '"' ) } , getPhysicsData : function ( a , b ) { if ( "undefined" == typeof b || null === b ) { if ( this . _physics [ a ] ) return this . _physics [ a ] . data ; console . warn ( 'Phaser.Cache.getPhysicsData: Invalid key: "' + a + '"' ) } else { if ( this . _physics [ a ] && this . _physics [ a ] . data [ b ] ) return this . _physics [ a ] . data [ b ] ; console . warn ( 'Phaser.Cache.getPhysicsData: Invalid key/object: "' + a + " / " + b + '"' ) } return null } , checkImageKey : function ( a ) { return this . _images [ a ] ? ! 0 : ! 1 } , getImage : function ( a ) { return this . _images [ a ] ? this . _images [ a ] . data : void console . warn ( 'Phaser.Cache.getImage: Invalid key: "' + a + '"' ) } , getTilemapData : function ( a ) { return this . _tilemaps [ a ] ? this . _tilemaps [ a ] : void console . warn ( 'Phaser.Cache.getTilemapData: Invalid key: "' + a + '"' ) } , getFrameData : function ( a ) { return this . _images [ a ] && this . _images [ a ] . frameData ? this . _images [ a ] . frameData : null } , updateFrameData : function ( a , b ) { this . _images [ a ] && ( this . _images [ a ] . spriteSheet = ! 0 , this . _images [ a ] . frameData = b ) } , getFrameByIndex : function ( a , b ) { return this . _images [ a ] && this . _images [ a ] . frameData ? this . _images [ a ] . frameData . getFrame ( b ) : null } , getFrameByName : function ( a , b ) { return this . _images [ a ] && this . _images [ a ] . frameData ? this . _images [ a ] . frameData . getFrameByName ( b ) : null } , getFrame : function ( a ) { return this . _images [ a ] && this . _images [ a ] . spriteSheet === ! 1 ? this . _images [ a ] . frame : null } , getTextureFrame : function ( a ) { return this . _textures [ a ] ? this . _textures [ a ] . frame : null } , getTexture : function ( a ) { return this . _textures [ a ] ? this . _textures [ a ] : void console . warn ( 'Phaser.Cache.getTexture: Invalid key: "' + a + '"' ) } , getSound : function ( a ) { return this . _sounds [ a ] ? this . _sounds [ a ] : void console . warn ( 'Phaser.Cache.getSound: Invalid key: "' + a + '"' ) } , getSoundData : function ( a ) { return this . _sounds [ a ] ? this . _sounds [ a ] . data : void console . warn ( 'Phaser.Cache.getSoundData: Invalid key: "' + a + '"' ) } , isSoundDecoded : function ( a ) { return this . _sounds [ a ] ? this . _sounds [ a ] . decoded : void 0 } , isSoundReady : function ( a ) { return this . _sounds [ a ] && this . _sounds [ a ] . decoded && this . game . sound . touchLocked === ! 1 } , isSpriteSheet : function ( a ) { return this . _images [ a ] ? this . _images [ a ] . spriteSheet : ! 1 } , getText : function ( a ) { return this . _text [ a ] ? this . _text [ a ] . data : void console . warn ( 'Phaser.Cache.getText: Invalid key: "' + a + '"' ) } , getJSON : function ( a ) { return this . _json [ a ] ? this . _json [ a ] . data : void console . warn ( 'Phaser.Cache.getJSON: Invalid key: "' + a + '"' ) } , getBinary : function ( a ) { return this . _binary [ a ] ? this . _binary [ a ] : void console . warn ( 'Phaser.Cache.getBinary: Invalid key: "' + a + '"' ) } , getKeys : function ( a ) { var c = null ; switch ( a ) { case b . Cache . CANVAS : c = this . _canvases ; break ; case b . Cache . IMAGE : c = this . _images ; break ; case b . Cache . TEXTURE : c = this . _textures ; break ; case b . Cache . SOUND : c = this . _sounds ; break ; case b . Cache . TEXT : c = this . _text ; break ; case b . Cache . PHYSICS : c = this . _physics ; break ; case b . Cache . TILEMAP : c = this . _tilemaps ; break ; case b . Cache . BINARY : c = this . _binary ; break ; case b . Cache . BITMAPDATA : c = this . _bitmapDatas ; break ; case b . Cache . BITMAPFONT : c = this . _bitmapFont ; break ; case b . Cache . JSON : c = this . _json } if ( c ) { var d = [ ] ; for ( var e in c ) "__default" !== e && "__missing" !== e && d . push ( e ) ; return d } } , removeCanvas : function ( a ) { delete this . _canvases [ a ] } , removeImage : function ( a ) { delete this . _images [ a ] } , removeSound : function ( a ) { delete this . _sounds [ a ] } , removeText : function ( a ) { delete this . _text [ a ] } , removeJSON : function ( a ) { delete this . _json [ a ] } , removePhysics : function ( a ) { delete this . _text [ a ] } , removeTilemap : function ( a ) { delete this . _text [ a ] } , removeBinary : function ( a ) { delete this . _text [ a ] } , removeBitmapData : function ( a ) { delete this . _text [ a ] } , removeBitmapFont : function ( a ) { delete this . _text [ a ] } , destroy : function ( ) { for ( va
} , 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 , this . context . save ( ) , this . context . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) , this . context . strokeStyle = c , this . context . fillStyle = c , this . context . font = this . font , this . context . globalAlpha = 1 } , stop : function ( ) { this . context . restore ( ) , this . context . globalAlpha = this . currentAlpha , this . sprite && PIXI . updateWebGLTexture ( this . baseTexture , this . game . renderer . gl ) } , line : function ( ) { for ( var a = this . currentX , b = 0 ; b < arguments . length ; b ++ ) this . renderShadow && ( this . context . fillStyle = "rgb(0,0,0)" , this . context . fillText ( arguments [ b ] , a + 1 , this . currentY + 1 ) , this . context . fillStyle = this . currentColor ) , this . context . fillText ( arguments [ b ] , a , this . currentY ) , a += this . columnWidth ; this . currentY += this . lineHeight } , soundInfo : function ( a , b , c , d ) { this . start ( b , c , d ) , this . line ( "Sound: " + a . key + " Locked: " + a . game . sound . touchLocked ) , this . line ( "Is Ready?: " + this . game . cache . isSoundReady ( a . key ) + " Pending Playback: " + a . pendingPlayback ) , this . line ( "Decoded: " + a . isDecoded + " Decoding: " + a . isDecoding ) , this . line ( "Total Duration: " + a . totalDuration + " Playing: " + a . isPlaying ) , this . line ( "Time: " + a . currentTime ) , this . line ( "Volume: " + a . volume + " Muted: " + a . mute ) , this . line ( "WebAudio: " + a . usingWebAudio + " Audio: " + a . usingAudioTag ) , "" !== a . currentMarker && ( this . line ( "Marker: " + a . currentMarker + " Duration: " + a . duration ) , this . line ( "Start: " + a . markers [ a . currentMarker ] . start + " Stop: " + a . markers [ a . currentMarker ] . stop ) , this . line ( "Position: " + a . position ) ) , this . stop ( ) } , cameraInfo : function ( a , b , c , d ) { this . start ( b , c , d ) , 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 ( ) } , 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 . screenX + " Screen Y: " + this . game . input . activePointer . screenY ) , this . stop ( ) } , spriteBounds : function ( a , b , c ) { var d = a . getBounds ( ) ; this . renderRectangle ( d , b , c ) } , spriteInfo : function ( a , b , c , d ) { this . start ( b , c , d ) , this . line ( "Sprite: (" + a . width + " x " + a . height + ") anchor: " + a . a
} , b . Particles . Arcade . Emitter . prototype = Object . create ( b . Group . prototype ) , b . Particles . Arcade . Emitter . prototype . constructor = b . Particles . Arcade . Emitter , b . Particles . Arcade . Emitter . prototype . update = function ( ) { if ( this . on ) if ( this . _explode ) { this . _counter = 0 ; do this . emitParticle ( ) , this . _counter ++ ; while ( this . _counter < this . _quantity ) ; this . on = ! 1 } else this . game . time . now >= this . _timer && ( this . emitParticle ( ) , this . _counter ++ , this . _quantity > 0 && this . _counter >= this . _quantity && ( this . on = ! 1 ) , this . _timer = this . game . time . now + this . frequency ) } , b . Particles . Arcade . Emitter . prototype . makeParticles = function ( a , c , d , e , f ) { "undefined" == typeof c && ( c = 0 ) , "undefined" == typeof d && ( d = this . maxParticles ) , "undefined" == typeof e && ( e = ! 1 ) , "undefined" == typeof f && ( f = ! 1 ) ; for ( var g , h = 0 , i = a , j = c ; d > h ; ) null === this . particleClass && ( "object" == typeof a && ( i = this . game . rnd . pick ( a ) ) , "object" == typeof c && ( j = this . game . rnd . pick ( c ) ) , g = new b . Sprite ( this . game , 0 , 0 , i , j ) ) , e ? ( g . body . checkCollision . any = ! 0 , g . body . checkCollision . none = ! 1 ) : g . body . checkCollision . none = ! 0 , g . body . collideWorldBounds = f , g . exists = ! 1 , g . visible = ! 1 , g . anchor . setTo ( . 5 , . 5 ) , this . add ( g ) , h ++ ; return this } , b . Particles . Arcade . Emitter . prototype . kill = function ( ) { this . on = ! 1 , this . alive = ! 1 , this . exists = ! 1 } , b . Particles . Arcade . Emitter . prototype . revive = function ( ) { this . alive = ! 0 , this . exists = ! 0 } , b . Particles . Arcade . Emitter . prototype . start = function ( a , b , c , d ) { "undefined" == typeof a && ( a = ! 0 ) , "undefined" == typeof b && ( b = 0 ) , "undefined" == typeof c && ( c = 250 ) , "undefined" == typeof d && ( d = 0 ) , this . revive ( ) , this . visible = ! 0 , this . on = ! 0 , this . _explode = a , this . lifespan = b , this . frequency = c , a ? this . _quantity = d : this . _quantity += d , this . _counter = 0 , this . _timer = this . game . time . now + c } , b . Particles . Arcade . Emitter . prototype . emitParticle = function ( ) { var a = this . getFirstExists ( ! 1 ) ; if ( null != a ) { if ( this . width > 1 || this . height > 1 ? a . reset ( this . game . rnd . integerInRange ( this . left , this . right ) , this . game . rnd . integerInRange ( this . top , this . bottom ) ) : a . reset ( this . emitX , this . emitY ) , a . lifespan = this . lifespan , a . body . bounce . setTo ( this . bounce . x , this . bounce . y ) , a . body . velocity . x = this . minParticleSpeed . x != this . maxParticleSpeed . x ? this . game . rnd . integerInRange ( this . minParticleSpeed . x , this . maxParticleSpeed . x ) : this . minParticleSpeed . x , a . body . velocity . y = this . minParticleSpeed . y != this . maxParticleSpeed . y ? this . game . rnd . integerInRange ( this . minParticleSpeed . y , this . maxParticleSpeed . y ) : this . minParticleSpeed . y , a . body . gravity . y = this . gravity , a . body . angularVelocity = this . minRotation != this . maxRotation ? this . game . rnd . integerInRange ( this . minRotation , this . maxRotation ) : this . minRotation , 1 !== this . minParticleScale || 1 !== this . maxParticleScale ) { var b = this . game . rnd . realInRange ( this . minParticleScale , this . maxParticleScale ) ; a . scale . setTo ( b , b ) } a . body . friction = this . particleFriction , a . body . angularDrag = this . angularDrag } } , b . Particles . Arcade . Emitter . prototype . setSize = function ( a , b ) { this . width = a , this . height = b } , b . Particles . Arcade . Emitter . prototype . setXSpeed = function ( a , b ) { a = a || 0 , b = b || 0 , this . minParticleSpeed . x = a , this . maxParticleSpeed . x = b } , b . Particles . Arcade . Emitter . prototype . setYSpeed = function ( a , b ) { a = a || 0 , b = b || 0 , this . minParticleSpeed . y = a , this . maxParticleSpeed . y = b } , b . Particles . Arcade . Emitter . prototype . setRotation = function ( a , b ) { a = a || 0 , b = b || 0 , this . minRotation = a , this . maxRotation = b } , b . Particles . Arcade . Emitter . prototype . at = function ( a ) { a . center && ( this . emitX = a . center . x , this . emitY = a . center . y ) } , Object . defineProperty ( b . Particles . Arcade . Emitter . prototype , "x" , { get : function ( ) { return this . emitX } , set : function ( a ) { this . emitX = a } } ) , Object . defineProperty ( b . Particles . Arcade . Emitter . prototype , "y" , { get : function ( ) { return this . emitY } , set : function ( a ) { this . emitY = a } } ) , Object . defineProperty ( b . Particles . Arcade . Emitter . prototype , "left" , { get : function ( ) { return Math . floor ( this . x - this . width / 2 ) } } ) , Object . defineProperty ( b . Particles . Arcade . Emitter . prototype , "right" , { get : function ( ) { return Math . floor ( this . x + this . width / 2 ) } } ) , Object . defineProperty ( b . Particles . Arcade . Emitter . prototype , "top" , { get : function ( ) { return Math . floor ( this . y - this . height / 2 ) } } ) , Object . defineProperty ( b . Particles . Arcade . Emitter . prototype , "bottom" , { get : function ( ) { return Math . floor ( this . y + this . height / 2 ) } } ) , b . Tile = function ( a , b , c , d , e , f ) { this . layer = a , thi
for ( var b = this . tileMargin , c = this . tileMargin , d = this . firstgid , e = 0 ; e < this . rows ; e ++ ) { for ( var f = 0 ; f < this . columns ; f ++ ) this . drawCoords [ d ] = [ b , c ] , b += this . tileWidth + this . tileSpacing , d ++ ; b = this . tileMargin , c += this . tileHeight + this . tileSpacing } } , setSpacing : function ( a , b ) { this . tileMargin = a , this . tileSpacing = b , this . setImage ( this . image ) } } , b . Tileset . prototype . constructor = b . Tileset , "undefined" != typeof exports ? ( "undefined" != typeof module && module . exports && ( exports = module . exports = b ) , exports . Phaser = b ) : "undefined" != typeof define && define . amd ? define ( "phaser" , b ) : a . Phaser = b } ) . call ( this ) ;