{"id":218697,"date":"2014-04-10T10:57:03","date_gmt":"2014-04-10T06:57:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=218697"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=218697","title":{"rendered":"<span class=\"post_title\">Particles System \u0432 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u043b\u043f\u044b (2)<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043e\u0442 07.04.2014 (<a href=\"http:\/\/habrahabr.ru\/post\/218473\/\">Particles System \u0432 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u043b\u043f\u044b<\/a>).<\/p>\n<p>  <b>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e:<\/b>  <\/p>\n<ol>\n<li>\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0438 (\u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0441\u0442\u0440\u0415\u043b\u043a\u0438)<\/li>\n<li>\u043e\u0433\u0438\u0431\u0430\u043d\u0438\u0435 \u0432 \u043f\u0443\u0442\u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0435\u043b\u043e\u043a \u0431\u044b\u0441\u0442\u0440\u044b\u043c\u0438<\/li>\n<li>\u0432\u0437\u0440\u044b\u0432\u044b (\u0441 \u0440\u0430\u0437\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u043b)<\/li>\n<\/ol>\n<p>  <a name=\"habracut\"><\/a><br \/>  <b>\u041a\u043e\u0440\u043e\u0442\u043a\u0430\u044f \u0440\u0435\u043c\u0430\u0440\u043a\u0430 \u043e \u0441\u0442\u0438\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 (\u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438):<\/b>  <\/p>\n<ul>\n<li>\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435, \u043a\u043e\u0434 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0430-\u043b\u044f \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u2014 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u043d \u0440\u0430\u0431\u043e\u0447\u0438\u0439, \u0432\u043e \u0433\u043b\u0430\u0432\u0443 \u0443\u0433\u043b\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u044c, \u0430 \u043d\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u00ab\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u00bb<\/li>\n<li>\u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (<i>MainWailines_1<\/i>) \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u0430\u0441\u0441 (<i>MainWailines_2<\/i>) \u2014 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u0440\u0430\u0434\u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438, \u0438 \u0447\u0442\u043e\u0431 \u043d\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 (\u0442.\u0435. \u2014 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u044f \u0431\u044b \u043d\u0435 \u0438\u0433\u0440\u0430\u043b\u0441\u044f \u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435)<\/li>\n<li>\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0443\u0434\u0430\u043b\u044f\u044e \u2014 \u0432\u0441\u0435 \u0440\u0430\u0434\u0438 \u0442\u043e\u0433\u043e \u0436\u0435, \u0434\u0430-\u0434\u0430, \u0440\u0430\u0434\u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438<\/li>\n<li>\u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u043c\u043d\u043e\u0433\u043e \u2014 \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u0442 \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443<\/li>\n<\/ul>\n<h5>\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0438<\/h5>\n<p>  \u041f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <i>MainWaylines_2.setupEmitterForMonsterArrows()<\/i>. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e <i>copy-paste<\/i> \u043f\u0440\u0435\u0436\u043d\u0435\u0433\u043e <i>MainWaylines_1.setupEmitter()<\/i>. \u042f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0434\u0430\u043b\u0438\u043b \u0441\u0442\u0430\u0440\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0438\u0445 \u043b\u0438\u0448\u044c \u0442\u0430\u043c, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"actionscript\">protected function setupEmitterForMonsterArrows():void { \tvar emitter:Emitter2D = new Emitter2D(); \t\/\/ \u044d\u0442\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a - \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430 1 \u0427\u0443\u0434\u043e\u0432\u0438\u0449\u043d\u0443\u044e \u0421\u0442\u0440\u0435\u043b\u043a\u0443 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \t\temitter.counter = new Steady(1); \t \t\tvar wayline:Wayline = _waylines[0]; \t\temitter.addInitializer( new Position( new LineZone( new Point(wayline.x - wayline.radius*Math.cos(wayline.rotation), wayline.y - wayline.radius*Math.sin(wayline.rotation)), new Point(wayline.x + wayline.radius*Math.cos(wayline.rotation), wayline.y + wayline.radius*Math.sin(wayline.rotation)) ) ) ); \t\/\/ \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c, \u043a\u0430\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043d\u0434\u0435\u0440\u0443 \u043f\u0440\u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \t\/\/ \u0434\u0435\u043b\u0430\u0435\u043c \u044e\u043d\u0438\u0442\u043e\u0432 \u043f\u043e\u043a\u0440\u0443\u043f\u043d\u0435\u0435 \t\temitter.addInitializer( new ImageClass( Arrow, [10] ) ); \t\t \t\temitter.addAction( new DeathZone( new RectangleZone( -30, -30, stage.stageWidth+60, stage.stageHeight + 60 ), true ) ); \t\temitter.addAction( new Move() ); \t\temitter.addAction( new RotateToDirection() ); \t\/\/ \u0435\u0441\u043b\u0438 \u044e\u043d\u0438\u0442\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043b\u043e, \u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \t\/\/ \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0442 action\t \t\/\/\temitter.addAction( new MinimumDistance( 7, 600 ) );\t\t\t \t \t\/\/ \u0434\u0435\u043b\u0430\u0435\u043c \u044e\u043d\u0438\u0442\u043e\u0432 \u043f\u043e\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \t\temitter.addAction( new ActionResistance(.1)); \t \t\temitter.addAction( new FollowWaylines(_waylines) );    \t    \tvar\trenderer:DisplayObjectRenderer = new DisplayObjectRenderer();    \t\taddChild( renderer );    \t\trenderer.addEmitter( emitter ); \t\/\/ \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u0435\u043c \u0441\u0442\u0430\u0440\u0442 \t\temitterWaylinesForMonsterArrows = emitter;\t\t\t \t\temitterWaylinesForMonsterArrows.start(); } <\/code><\/pre>\n<p>  \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c <i>MainWaylines_2.setup()<\/i><\/p>\n<pre><code class=\"actionscript\">override protected function setup(e:Event=null):void { \tsuper.setup(); \t \t\/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \u0434\u043b\u044f \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 \tsetupEmitterForMonsterArrows(); } <\/code><\/pre>\n<p>  \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u044d\u0442\u043e\u0439. \u041a\u0440\u0443\u043f\u043d\u044b\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u0441\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043c\u0435\u043b\u043a\u0438\u043c\u0438 \u2014 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/1c0\/d60\/5f9\/1c0d605f9e61f66b5a575fe1efc74fad.png\"\/><\/p>\n<h5>\u043e\u0433\u0438\u0431\u0430\u043d\u0438\u0435 \u0432 \u043f\u0443\u0442\u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0435\u043b\u043e\u043a \u0431\u044b\u0441\u0442\u0440\u044b\u043c\u0438<\/h5>\n<p>  \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u043c\u0435\u043b\u043e\u0447\u044c \u043e\u0433\u0438\u0431\u0430\u043b\u0430 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438, \u043d\u0443\u0436\u043d\u043e \u0438\u043c \u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0432 <i>MainWaylines_2.setup()<\/i>, \u0433\u0434\u0435 <i>Antigravities<\/i> \u2014 \u044d\u0442\u043e \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <i>action<\/i> \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0446 (\u043a\u043b\u0430\u0441\u0441\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0434\u0430?).<\/p>\n<pre><code class=\"actionscript\">override protected function setup(e:Event=null):void { \tsuper.setup(); \t \t\/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \u0434\u043b\u044f \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 \tsetupEmitterForMonsterArrows(); \t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 action \u043a \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0443 &quot;\u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445&quot;         \/\/ \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435(!) \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \u0423\u0416\u0415 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0438 \u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c - \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u0438\u0446 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 \u043b\u0435\u0442\u0443 \temitterWaylines.addAction( new Antigravities(emitterWaylinesForMonsterArrows, -400000) ); } <\/code><\/pre>\n<p>  \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u043e\u0442 \u043d\u0430 \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443. \u041c\u0435\u043b\u043a\u0438\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u0443\u0436\u0435 \u043e\u0433\u0438\u0431\u0430\u044e\u0442 \u043a\u0440\u0443\u043f\u043d\u044b\u0435, \u043d\u043e \u0443\u0436 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u0445 \u0441\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0437\u0430\u0434\u0438. \u042d\u0442\u0438 \u043f\u0440\u043e\u0431\u043a\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0441\u043c\u043e\u0442\u0440\u044f\u0442\u0441\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/25a\/0ab\/79c\/25a0ab79c5c95d7fa8033c6de530a657.png\"\/><\/p>\n<p>  \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437-\u0437\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u00ab\u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430\u00bb. <i>Antigravities<\/i> \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u043b\u043a\u0438\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u043e\u0433\u0438\u0431\u0430\u0442\u044c \u043a\u0440\u0443\u043f\u043d\u044b\u0435. \u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0433\u043e\u043d\u0438\u0442 \u0438\u0445 \u0432\u043f\u0435\u0440\u0435\u0434 <i>FollowWaylines<\/i> \u2014 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u0435\u043b\u043a\u0430 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u043d\u0430 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0435 \u043f\u0443\u0442\u0438, \u043f\u043e\u043c\u043d\u0438\u0442\u0435? \u041c\u0435\u043b\u043a\u0438\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0443\u0441\u043f\u0435\u0432\u0430\u044e\u0442 \u0432\u043e\u0432\u0440\u043c\u044f \u043e\u0431\u043e\u0433\u043d\u0443\u0442\u044c \u043a\u0440\u0443\u043f\u043d\u0443\u044e \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u044e\u0442\u0441\u044f \u043a \u0443\u0437\u043b\u043e\u0432\u044b\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u043d\u0430 \u043f\u0443\u0442\u0438. \u041e\u0434\u043d\u043e \u0438\u0437 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 (\u0438 \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435) \u2014 \u044d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d\u044b \u043e\u0442\u0440\u0435\u0437\u043a\u043e\u0432 \u043f\u0443\u0442\u0438 (\u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0443\u0437\u043b\u0430\u043c\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430).<\/p>\n<p>  \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c <i>MainWaylines_2.setupWaylines()<\/i> \u0440\u0430\u0434\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438<\/p>\n<pre><code class=\"actionscript\">override protected function setupWaylines():void { \t_waylines = []; \t \tvar w:Number = stage.stageWidth; \tvar h:Number = stage.stageHeight; \tvar points:Array = [new Point(-9,h*.4), new Point(w*.3,h*.4), new Point(w*.5,h*.1), new Point(w*.8,h*.1), new Point(w*.8,h*.9), new Point(w*.5, h*.9), new Point(w*.3, h*.8), new Point(-40, h*.8)]; \tvar fitline:FitLine = new FitLine(points); \tvar path:Path = new Path(fitline.fitPoints); \t \t\/* \t * \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043e\u0434\u043d\u043e \u0447\u0438\u0441\u043b\u043e. \u0411\u044b\u043b\u043e 40, \u0441\u0442\u0430\u043d\u0435\u0442 25 \t *  \t * \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c, \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b \u0431\u044b \u0447\u0438\u0441\u043b\u043e \u0448\u0430\u0433\u043e\u0432 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u043b\u0438\u043d\u044b \u043f\u0443\u0442\u0438 \t * \u043d\u0443, \u044d\u0442\u043e \u043d\u0430\u0434\u043e \u043b\u0438\u0448\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \t *\/ \tvar step:Number = path.length \/ 25; \t \tvar strength:Number = 100; \tfor(var i:int=0; i&lt;path.length; i+=step) \t{ \t\tvar segmentLength:int = 60;\/\/*Math.random()+10; \t\tvar pathpoint:PathPoint = path.getPathPoint(i); \t\tvar wayline:Wayline = new Wayline(pathpoint.x, pathpoint.y, segmentLength, pathpoint.rotation-Math.PI\/2, strength); \t\t_waylines.push(wayline); \t} } <\/code><\/pre>\n<p>  \u0410 \u0435\u0449\u0435, \u0440\u0430\u0437 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0441\u0442\u0440\u0435\u043b\u043e\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u043b\u043a\u0438\u0445 (\u0432 60 \u0440\u0430\u0437), \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0437\u043a\u043e\u043c\u0443 \u0444\u0430\u0440\u0432\u0430\u0442\u0435\u0440\u0443 (\u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u042d\u041c\u0418\u0422\u0422\u0415\u0420\u0410 \u0434\u043b\u044f \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0441\u0442\u0440\u0435\u043b\u043e\u043a), \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0434\u0430\u0442\u044c \u043c\u0435\u043b\u043a\u0438\u043c \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u0441 \u043a\u0440\u0430\u044e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0435\u0435.<\/p>\n<p>  \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c <i>MainWaylines_2.setupEmitterForMonsterArrows()<\/i>, \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0432 <i>LineZone<\/i> \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430 \u043d\u0430 20 (\u043f\u043e 10 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b)<\/p>\n<pre><code class=\"actionscript\">emitter.addInitializer( new Position( new LineZone( new Point(wayline.x - (wayline.radius-10)*Math.cos(wayline.rotation), wayline.y - (wayline.radius-10)*Math.sin(wayline.rotation)), new Point(wayline.x + (wayline.radius-10)*Math.cos(wayline.rotation), wayline.y + (wayline.radius-10)*Math.sin(wayline.rotation)) ) ) ); <\/code><\/pre>\n<p>  \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0431\u043a\u0438 \u0437\u0430 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438 \u0441\u0442\u0430\u043b\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/b07\/959\/80e\/b0795980ea224259bb8967389b818774.png\"\/><\/p>\n<h5>\u0432\u0437\u0440\u044b\u0432\u044b (\u0441 \u0440\u0430\u0437\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u043b)<\/h5>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \u2014 \u0434\u043b\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043b<\/p>\n<pre><code class=\"actionscript\">protected function setupEmitterForExplosion():void { \tvar emitter:Emitter2D = new Emitter2D(); \t\/\/ \u0447\u0442\u043e\u0431 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0434\u0432\u0438\u0433\u0430\u043b\u0438\u0441\u044c - \u044d\u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e \t\temitter.addAction( new Move() ); \t\/\/ \u0447\u0442\u043e\u0431 \u043d\u0435 \u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0438\u043b, \u0447\u0442\u043e\u0431 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0447\u0430\u0441\u0442\u0438\u0446\u044b - \u043f\u0440\u043e\u0449\u0435 \u0442\u0443\u043f\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\t\t\t\t \t\temitter.addAction( new SpeedLimit(40)); \t\/\/ \u044d\u0442\u043e \u0447\u0442\u043e\u0431 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u043b\u0438\u0441\u044c - \u0442\u0440\u0435\u043d\u0438\u0435 \t\temitter.addAction( new Friction(40) ); \t\/\/ \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 - \u0432\u0434\u0440\u0443\u0433 \u0432\u044b\u043b\u0435\u0442\u044f\u0442 (\u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c) \t\temitter.addAction( new DeathZone( new RectangleZone( -30, -10, stage.stageWidth+40, stage.stageHeight + 20 ), true ) ); \t\/\/ \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440 \tvar\trenderer:DisplayObjectRenderer = new DisplayObjectRenderer();    \t\taddChild( renderer );    \t\trenderer.addEmitter( emitter ); \t\/\/ \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u0435\u043c \u0441\u0442\u0430\u0440\u0442 \t\temitterExplosion = emitter;\t \t\temitterExplosion.start(); } <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 <i>MouseEvent.MOUSE_DOWN<\/i> \u0432 <i>MainWaylines_2.setup()<\/i> \u2014 \u043f\u043e \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c \u0431\u0443\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0437\u0440\u044b\u0432\u044b<\/p>\n<pre><code class=\"actionscript\">stage.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown); <\/code><\/pre>\n<p>  \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <i>explosion(e);<\/i>? \u0422\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u0437\u0440\u044b\u0432\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f<\/p>\n<pre><code class=\"actionscript\">private function handleMouseDown(e:MouseEvent):void { \texplosion(e); } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c \u0432\u0437\u0440\u044b\u0432<\/p>\n<pre><code class=\"actionscript\">private function explosion(e:MouseEvent):void {\t \tif(emitterWaylines == null){ return; } \tif(emitterExplosion == null){ return; } \t \t\/\/ \u0440\u0430\u0434\u0438\u0443\u0441 \u0432\u0437\u0440\u044b\u0432\u0430 \tvar explRadius:int = 30; \t\/\/ \u0440\u0430\u0434\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0432\u043e\u0434\u0438\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435  \t\/\/ (\u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0446\u0438\u043a\u043b\u043e\u0432 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043d\u0435 \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e, \u0430 \u0447\u0435\u0440\u0435\u0437 dot-\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f) \tvar particleOrigin:Particle2D; \tvar particleClone:Particle2D; \tvar particlePoint:Point = new Point(); \t \t\/\/ \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u043b \u0432\u0437\u0440\u044b\u0432 \u0432 \u0442\u043e\u0447\u043a\u0435... \tvar explPoint:Point = new Point(e.stageX, e.stageY); \t\/\/ \u0433\u043e\u0442\u043e\u0432\u0438\u043c\u0441\u044f \u043a \u0434\u043b\u0438\u043d\u043d\u043e\u043c\u0443 \u0446\u0438\u043a\u043b\u0443 \tvar particles:Array = emitterWaylines.particlesArray; \tvar length:int = particles.length; \t\/\/ \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0447\u0430\u0441\u0442\u0438\u0446 \u0432 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0435 \tfor(var p:int=0; p&lt;length; p++) \t{ \t\tparticleOrigin = particles[p]; \t\tparticlePoint.x = particleOrigin.x; \t\tparticlePoint.y = particleOrigin.y; \t\t\/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043b\u0438 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0432 \u0440\u0430\u0434\u0443\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u0437\u0440\u044b\u0432\u0430 \t\tif(Point.distance(explPoint, particlePoint) &lt; explRadius) \t\t{ \t\t\t\/* \t\t\t * \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0447\u0430\u0441\u0442\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u043a\u0440\u044b\u043b\u043e \u0432\u0437\u0440\u044b\u0432\u043e\u043c - \u0435\u0435 \u043a\u043b\u043e\u043d \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \u0432\u0437\u0440\u044b\u0432\u043e\u0432 \t\t\t * \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u0435\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u043c\u043f\u0443\u043b\u044c\u0441 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f - \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0442\u0435\u0440\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \t\t\t *\/ \t\t\tparticleClone = particleOrigin.clone(emitterExplosion.particleFactory) as Particle2D; \t\t\tparticleClone.angVelocity = -5 + Math.random() * 10; \t\t\t\/* \t\t\t * \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 Arrow (\u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430) - \u0432\u0435\u0434\u044c \u043e\u0431\u044a\u043a\u0442\u044b \u0432 ActionScript \u043d\u0435 \u043a\u043e\u043f\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0438\u0445 \t\t\t * \u0412\u0410\u0416\u041d\u041e! \u0435\u0441\u043b\u0438 \u043a\u043e\u043f\u0438\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443,  \t\t\t * \u0442\u043e \u043f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0438\u0437 \u043f\u0440\u0435\u0436\u043d\u0435\u0433\u043e \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430 emitterWaylines \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430  \t\t\t * - \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0435\u043d\u0434\u0435\u0440 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c renderer.removeChild() \t\t\t *  \t\t\t * \u044d\u0442\u043e \u0432\u0435\u0434\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f. \u0418 \u0440\u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u043d\u0434\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.  \t\t\t * \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u0433\u0440\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 (\u0438 \u0431\u0443\u0434\u0435\u0442\u0435, \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u044b,  \t\t\t * \u0438 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 \u0447\u0430\u0441\u0442\u0438\u0446 (\u043a\u0441\u0442\u0430\u0442\u0438 - \u0432\u043e\u0442 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438)  \t\t\t *\/ \t\t\tparticleClone.image = new Arrow(4, 0xff0000); \t\t\t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u0438\u0446\u0443 \u0432 \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \u0432\u0437\u0440\u044b\u0432\u043e\u0432 \t\t\temitterExplosion.addParticle(particleClone); \t\t\t\/\/ \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430 \t\t\tparticleOrigin.isDead = true; \t\t} \t} \t \t\/* \t * \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c action \u0432 \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \u0432\u0437\u0440\u044b\u0432\u043e\u0432 \t *  \t * \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u0439 - \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c,  \t * \u0437\u0430\u0446\u0435\u043f\u0438\u043b\u043e \u043b\u0438 \u043a\u043e\u0433\u043e \u0432\u0437\u0440\u044b\u0432\u043e\u043c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e (\u0442.\u0435 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043c \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u044d\u043a\u0437\u043c\u043f\u043b\u044f\u0440\u0430 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430). \t *  \t * \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b - \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0434\u0432\u0430 \u0446\u0438\u043a\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c: \u043f\u043e\u0438\u0441\u043a \u0438 \u0437\u0430\u043a\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 \u043d\u043e\u0432\u044b\u0439 \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \t *  \t * \u0430 \u043c\u043e\u0436\u0435\u0442, \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0438\u0433\u0440\u0435 \u0432\u0437\u0440\u044b\u0432\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043b\u043f\u0435, \u0442\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u0435\u0440\u043d\u044b\u0439...  \t * \u0432 \u043e\u0431\u0449\u0435\u043c - \u0442\u0443\u0442 \u043d\u0443\u0436\u043d\u0430 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \t *\/ \tvar explosion:Explosion = new Explosion(10000, explPoint.x, explPoint.y, 100); \temitterExplosion.addAction(explosion); \t \t\/* \t * \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e\u0431 \u0432\u0437\u0440\u044b\u0432 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u043d\u0430 \u0447\u0430\u0441\u0442\u0438\u0446\u0443 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f - \u0447\u0442\u043e\u0431 \u0435\u0435 \u043d\u0435 \u0443\u043d\u0435\u0441\u043b\u043e \u0437\u0430 \u0442\u0440\u0438\u0434\u0435\u0432\u044f\u0442\u044c \u0437\u0435\u043c\u0435\u043b\u044c \t * \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u041e\u0414\u0418\u041d \u0440\u0430\u0437 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c Emitter2D.update(.2) - \u0447\u0442\u043e\u0431 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u043e\u0435 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \t *\/\t\t\t \t\/\/ \u0437\u0430\u0434\u0430\u0435\u043c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u0430\u043c \u0432 \u0437\u043e\u043d\u0435 \u0432\u0437\u0440\u044b\u0432\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430 \temitterExplosion.update(0.2); \t\/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c action Explosion  - \u043e\u043d \u0443\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \temitterExplosion.removeAction(explosion);\t\t\t } <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0438\u043a\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u2014 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0431\u0435\u0441\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0430 \u0432\u0435\u0434\u044c \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043f\u043e\u0442\u043e\u043a.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/abe\/638\/e42\/abe638e421144e1684e5f4649474e246.png\"\/><\/p>\n<p>  \u0421\u0443\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0441\u0442\u0430 \u2014 \u043f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0434\u043e \u00ab\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u00bb \u0447\u0430\u0441\u0442\u0438\u0446\u0443 \u0432 \u043f\u0440\u0435\u0436\u043d\u0438\u0439 \u043f\u043e\u0442\u043e\u043a. <br \/>  1. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043d\u043e\u0441\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <i>MainWaylines_2.setupEmitterForExplosion()<\/i>:  <\/p>\n<pre><code class=\"actionscript\">protected function setupEmitterForExplosion():void { \tvar emitter:Emitter2D = new Emitter2D(); \t... \t\/\/ \u044d\u0442\u043e\u0442 action \u043e\u0442\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 &quot;\u0432\u043e\u0437\u0440\u0430\u0441\u0442&quot; \u0447\u0430\u0441\u0442\u0438\u0446\u044b. \u041f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430, \u0447\u0430\u0441\u0442\u0438\u0446\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f. \t\/\/ \u0441\u043e\u043e\u0442\u0432. \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u0447\u0442\u043e\u0431 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0446\u0443 \u0432 \u043f\u0440\u0435\u0436\u043d\u0438\u0439 \u044d\u043c\u0438\u0442\u0442\u0435\u0440  \t\temitterExplosion.addAction( new Age() ); \t... \t\/\/ \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 &quot;\u0441\u043c\u0435\u0440\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u043e\u0442 \u0441\u0442\u0430\u0440\u043e\u0441\u0442\u0438&quot;, \u0447\u0442\u043e\u0431 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0435\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 &quot;\u0440\u043e\u0434\u043d\u043e\u0439&quot; \u044d\u043c\u0438\u0442\u0442\u0435\u0440 \t \temitterExplosion.addEventListener(ParticleEvent.PARTICLE_DEAD, handleParticleDeadFromEmitterExplosion); } <\/code><\/pre>\n<p>  2. \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <i>MainWaylines_2.explosion()<\/i><\/p>\n<pre><code class=\"actionscript\">private function explosion(e:MouseEvent):void {\t \t... \t\/\/ \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0447\u0430\u0441\u0442\u0438\u0446 \u0432 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0435 \tfor(var p:int=0; p&lt;length; p++) \t{ \t\t... \t\t\/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043b\u0438 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0432 \u0440\u0430\u0434\u0443\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u0437\u0440\u044b\u0432\u0430 \t\tif(Point.distance(explPoint, particlePoint) &lt; explRadius) \t\t{ \t\t\tparticleClone = particleOrigin.clone(emitterExplosion.particleFactory) as Particle2D; \t\t\tparticleClone.angVelocity = -5 + Math.random() * 10; \t\t\t\/* \t\t\t * action Age() \u0432 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0435 \u0432\u0437\u0440\u044b\u0432\u043e\u0432, \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \t\t\t * \u0438 \u043a\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0441\u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u0437\u0430\u044f\u0432\u0435\u043d\u043d\u044b\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043c \u0436\u0438\u0437\u043d\u0438, \u043e\u043d\u0430 &quot;\u0443\u043c\u0440\u0435\u0442&quot; \t\t\t * \u0442\u043e\u0433\u0434\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0441\u043c\u0435\u0440\u0442\u0438 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u0442 \u0447\u0430\u0441\u0442\u0438\u0446\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \t\t\t *\/ \t\t\tparticleClone.lifetime = 3; \t\t\tparticleClone.age = 0;                        ... \t\t} \t} \t... } <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/4f3\/573\/3ce\/4f35733ce303431497c766316bba867c.png\"\/><\/p>\n<p>  <b>\u0418\u0442\u043e\u0433:<\/b>  <\/p>\n<ol>\n<li>\u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u044e\u043d\u0438\u0442\u043e\u0432: \u043c\u0435\u043b\u043a\u0438\u0435 \u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0435<\/li>\n<li>\u043c\u0435\u043b\u043a\u0438\u0435 \u044e\u043d\u0438\u0442\u044b \u043e\u0433\u0438\u0431\u0430\u044e\u0442 \u043a\u0440\u0443\u043f\u043d\u044b\u0435<\/li>\n<li>\u0432\u0437\u0440\u044b\u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u044e\u0442 \u043d\u0430 \u043c\u0435\u043b\u043a\u0438\u0435 \u044e\u043d\u0438\u0442\u044b (\u043f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0448\u0440\u0430\u043f\u043d\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u0442\u0430\u043d\u043a\u0438 \u2014 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438)<\/li>\n<li>\u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u0435\u043b\u043a\u0438\u0435 \u043e\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043e\u0442 \u00ab\u043a\u0430\u043d\u0442\u0443\u0437\u0438\u0438\u00bb, \u043e\u043d\u0438 \u0441\u043d\u043e\u0432\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u0449\u0438\u0439 \u043f\u043e\u0442\u043e\u043a<\/li>\n<\/ol>\n<p>  <b>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043c\u0438\u043d\u0443\u0441\u044b<\/b>  <\/p>\n<ol>\n<li>\u043d\u0435-\u044d\u043f\u0438\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u0435\u043b\u043e\u043a<\/li>\n<li>\u043d\u0438\u0437\u043a\u0438\u0439 <i>FPS<\/i><\/li>\n<\/ol>\n<p>  \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f.1. \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u043e\u0432 (\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u043c\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0446 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0439), \u0442\u043e \u0447\u0442\u043e \u0436\u0435 \u0441 \u043f.2.(<i>FPS<\/i>)? \u0415\u0441\u0442\u044c \u043b\u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438? \u0412\u0435\u0434\u044c \u043d\u0430\u0434\u043e \u0436\u0435 \u0435\u0449\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c, \u0435\u0449\u0435 \u043a\u0443\u0447\u0443 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430\u2026<\/p>\n<p>  <b>\u0414\u0443\u043c\u0430\u044e, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c, \u0438 \u043d\u0435\u043c\u0430\u043b\u044b\u0439<\/b>  <\/p>\n<ol>\n<li>\u0417\u0430\u043f\u0440\u0435\u0442 \u043d\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043c\u0435\u043b\u043a\u0438\u043c\u0438 \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438, \u043f\u0440\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445 \u2014 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0447\u0438\u0441\u0442\u0430\u044f \u0431\u043b\u0430\u0436\u044c \u2014 \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0441\u043b\u043e \u044e\u043d\u0438\u0442\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0432 2-5 \u0440\u0430\u0437, \u0438 \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432\u0448\u0435\u0439\u0441\u044f \u043a\u0430\u0448\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0431\u0443\u0434\u0435\u0442 (\u0430 \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f \u043d\u0430 \u043f\u043e\u043b\u0435 \u043d\u0435 <i>top-down<\/i>, \u043a\u0430\u043a \u0441\u0435\u0439\u0447\u0430\u0441, \u0430 \u0438\u0437\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f?). \u0414\u0430 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u00ab\u043f\u043e\u043b\u043d\u043e\u0439 \u043a\u0430\u0448\u0438\u00bb \u2014 \u0432\u0435\u0434\u044c \u043c\u0435\u043b\u043a\u0438\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435, \u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c (\u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430 \u043a \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439). \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c <i>action MinimumDistance<\/i>, \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0438\u0439 \u0432\u0437\u0430\u0438\u043c\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u2014 \u043e\u0441\u043e\u0431\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435 (\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043e\u0431\u0433\u043e\u043d\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0445). \u0410 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 (\u043c\u043e\u0436\u0435\u0442\u0435 \u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u043a\u043e\u0434 action-\u0430 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0421\u041a\u041e\u041b\u042c\u041a\u041e \u0442\u0430\u043c \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432).<\/li>\n<li>\u041f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b \u00ab\u0440\u043e\u0434\u043d\u043e\u0439\u00bb \u0440\u0435\u043d\u0434\u0435\u0440 \u2014 \u0438 FPS \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0434\u0440\u043e\u0441 \u0432 \u0431\u043e\u043b\u0435\u0435, \u0447\u0435\u043c \u0432 \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u0440\u0430\u0437\u0430 (\u0430 \u0435\u0441\u043b\u0438 \u043d\u0430 <a href=\"http:\/\/gamua.com\/starling\/\">Starling<\/a>). <br \/>   <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/e98\/f89\/789\/e98f897893bf49debb5be36b29cc045b.png\"\/><\/li>\n<\/ol>\n<p>  <b>\u0422\u0435\u043f\u0435\u0440\u044c \u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u2014 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0421\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0427\u0430\u0441\u0442\u0438\u0446.<\/b><br \/>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043e\u043d \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u2014 \u00ab\u043a\u0443\u0447\u0438\u00bb \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u043e\u0432, \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043a \u043d\u0438\u043c, \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0447\u0430\u0441\u0442\u0438\u0446 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438\u2026 <br \/>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043f\u0440\u0438 <i>data-oriented<\/i> \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0442\u0435\u043d \u0447\u0430\u0441\u0442\u0438\u0446 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430\u0445. \u0410 \u0443 \u043d\u0430\u0441 \u0438\u0445 \u0441\u0435\u0439\u0447\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0438 (\u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u044b \u0434\u043b\u044f \u043c\u0435\u043b\u043a\u0438\u0445 \u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0441\u0442\u0440\u0435\u043b\u043e\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u043b\u0438\u0437\u043d\u0435\u0446\u044b-\u0431\u0440\u0430\u0442\u044c\u044f). <br \/>  \u0415\u0449\u0435 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 (<i>State<\/i>) \u2014 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0443 \u0438 \u043f\u043e\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0437\u0440\u044b\u0432\u043d\u043e\u0439 \u0432\u043e\u043b\u043d\u043e\u0439. \u0410 \u00ab\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430\u00bb \u0447\u0430\u0441\u0442\u0438\u0446 \u043c\u0435\u0436\u0434\u0443 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430\u043c\u0438 \u2014 \u043d\u0438 \u0447\u0442\u043e \u0438\u043d\u043e\u0435, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u041a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/code.google.com\/p\/particles-system-crowd\/\">google code<\/a>. \u041a\u043b\u0430\u0441\u0441 <i>MainWaylines_2<\/i><\/p>\n<p>  PS: \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0433\u0438\u0431\u0435\u043b\u044c \u0441\u0442\u0440\u0435\u043b\u043e\u043a (\u0432\u0435\u0434\u044c \u0432\u0437\u0440\u044b\u0432\u044b \u0443\u0431\u0438\u0432\u0430\u044e\u0442)<br \/>  \u043f\u043e\u0438\u0433\u0440\u0430\u044e\u0441\u044c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u043e\u0432 \u2014 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u044d\u043f\u0438\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  PPS: \u0412\u043e\u043f\u0440\u043e\u0441. \u0425\u043e\u0447\u0443 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u043b\u0435\u0433\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <i>sprite sheet<\/i> \u0438\u0437 \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 3D \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439. \u041a\u0430\u043a \u044f \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u044d\u0442\u043e \u0432\u0438\u0436\u0443:  <\/p>\n<ol>\n<li>\u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436<\/li>\n<li>\u0445\u043e\u0447\u0443 \u0432 \u043d\u0435\u043a\u043e\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<br \/> \n<ul>\n<li>\u0440\u0430\u0437\u043c\u0435\u0440<\/li>\n<li>\u0443\u0433\u043e\u043b \u043a\u0430\u043c\u0435\u0440\u044b<\/li>\n<li>\u0447\u0438\u0441\u043b\u043e \u0444\u0440\u0435\u0439\u043c\u043e\u0432<\/li>\n<\/ul>\n<\/li>\n<li>\u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u2014 <i>sprite sheet<\/i><\/li>\n<\/ol>\n<p>\u041d\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442\u0435, \u0432 \u043a\u0430\u043a\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c? \u041c\u043e\u0436\u0435\u0442 \u0435\u0441\u0442\u044c \u041f\u041e\u0414\u0420\u041e\u0411\u041d\u041e\u0415 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0420\u0410\u0411\u041e\u0427\u0415\u0419 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438? <br \/>  \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e.      \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/218697\/\"> http:\/\/habrahabr.ru\/post\/218697\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043e\u0442 07.04.2014 (<a href=\"http:\/\/habrahabr.ru\/post\/218473\/\">Particles System \u0432 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u043b\u043f\u044b<\/a>).<\/p>\n<p>  <b>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e:<\/b>  <\/p>\n<ol>\n<li>\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0438 (\u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0441\u0442\u0440\u0415\u043b\u043a\u0438)<\/li>\n<li>\u043e\u0433\u0438\u0431\u0430\u043d\u0438\u0435 \u0432 \u043f\u0443\u0442\u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0435\u043b\u043e\u043a \u0431\u044b\u0441\u0442\u0440\u044b\u043c\u0438<\/li>\n<li>\u0432\u0437\u0440\u044b\u0432\u044b (\u0441 \u0440\u0430\u0437\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u043b)<\/li>\n<\/ol>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-218697","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/218697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=218697"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/218697\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=218697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=218697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=218697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}