window.__require=function t(e,o,n){function r(c,a){if(!o[c]){if(!e[c]){var p=c.split("/");if(p=p[p.length-1],!e[p]){var s="function"==typeof __require&&__require;if(!a&&s)return s(p,!0);if(i)return i(p,!0);throw new Error("Cannot find module '"+c+"'")}}var d=o[c]={exports:{}};e[c][0].call(d.exports,function(t){return r(e[c][1][t]||t)},d,d.exports,t,e,o,n)}return o[c].exports}for(var i="function"==typeof __require&&__require,c=0;c<n.length;c++)r(n[c]);return r}({Game:[function(t,e,o){"use strict";cc._RF.push(e,"64d683G4+pFN70+6uwObBKO","Game"),Object.defineProperty(o,"__esModule",{value:!0});var n=cc._decorator,r=n.ccclass,i=n.property,c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.nodeBox=null,e.nodeOut=null,e.graphics=null,e.world=null,e.canUpDate=!1,e}return __extends(e,t),e.prototype.onLoad=function(){this.createB2()},e.prototype.onDestroy=function(){},e.prototype.init=function(){},e.prototype.clear=function(){},e.prototype.createB2=function(){var t=this,e=new b2Vec2(0,-10);window.world=new b2World(e,!0);var o=new b2PolygonShape;o.SetAsBoxXYCenterAngle(25/15,25/15,this.convertToPWorld(this.nodeBox.position),0);var n=new b2ParticleSystemDef;n.radius=.05;var r=window.world.CreateParticleSystem(n),i=new b2ParticleGroupDef;i.shape=o;r.CreateParticleGroup(i);this.scheduleOnce(function(){t.canUpDate=!0},1)},e.prototype.update=function(t){if(this.canUpDate){window.world.Step(t,8,3);for(var e=0,o=window.world.particleSystems.length;e<o;e++)this.drawParticleSystem(window.world.particleSystems[e])}},e.prototype.drawParticleSystem=function(t){var e=t.GetPositionBuffer(),o=e.length,n=this.nodeOut.x-this.nodeOut.width/2,r=this.nodeOut.x+this.nodeOut.width/2,i=this.nodeOut.y-this.nodeOut.height/2,c=i+.6*this.nodeOut.height;this.graphics.clear();for(var a=0;a<o;a+=2){var p=32*e[a],s=32*e[a+1];this.graphics.circle(p,s,1.76),this.graphics.fill(),n<p&&p<r&&i<s&&s<c&&0}},e.prototype.convertToPWorld=function(t){return new b2Vec2(t.x/32,t.y/32)},__decorate([i(cc.Node)],e.prototype,"nodeBox",void 0),__decorate([i(cc.Node)],e.prototype,"nodeOut",void 0),__decorate([i(cc.Graphics)],e.prototype,"graphics",void 0),e=__decorate([r],e)}(cc.Component);o.default=c,cc._RF.pop()},{}],Line:[function(t,e,o){"use strict";cc._RF.push(e,"85d5f0pwXNN3ZEKYD0/Us9Y","Line"),Object.defineProperty(o,"__esModule",{value:!0});var n=cc._decorator,r=n.ccclass,i=(n.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.body=null,e.canUpDate=!1,e}return __extends(e,t),e.prototype.onLoad=function(){this.init()},e.prototype.onDestroy=function(){},e.prototype.init=function(){var t=this,e=this.node.position,o=this.node.width,n=this.node.height,r=new b2BodyDef;r.angle=-this.node.angle*Math.PI/180,r.position=this.convertToPWorld(e),r.gravityScale=.5,this.body=window.world.CreateBody(r);var i=new b2PolygonShape;i.SetAsBoxXY(o/32/2,n/32/2),this.body.CreateFixtureFromShape(i,.1),this.scheduleOnce(function(){t.canUpDate=!0},.8)},e.prototype.convertToPWorld=function(t){return new b2Vec2(t.x/32,t.y/32)},e.prototype.convertToNode=function(t){var e=cc.v2(t).mul(32);return cc.v2(e.x,e.y)},e.prototype.update=function(t){this.canUpDate&&(this.node.position=this.convertToNode(this.body.GetPosition()),this.node.angle=-this.body.GetAngle()/Math.PI/180)},e=__decorate([r],e)}(cc.Component));o.default=i,cc._RF.pop()},{}]},{},["Game","Line"]);