{"id":221197,"date":"2014-05-04T02:23:03","date_gmt":"2014-05-03T22:23:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=221197"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=221197","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 (3)<\/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 10.04.2014 (<a href=\"http:\/\/habrahabr.ru\/post\/218697\/\">Particles System \u0432 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u043b\u043f\u044b(2)<\/a>).<\/p>\n<p>  <b>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438:<\/b>  <\/p>\n<ol>\n<li>\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)<\/li>\n<li>\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<\/li>\n<\/ol>\n<p>  <b>\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)<\/b><\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u00ab\u0443\u0431\u0438\u0442\u044c \u0441\u0442\u0440\u0435\u043b\u043a\u0443\u00bb, \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432. \u042f \u0436\u0435 \u0432\u044b\u0431\u0435\u0440\u0443 \u0441\u0430\u043c\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u2014 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0435 \u00ab\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f\u00bb \u0434\u043e \u043d\u0443\u043b\u044f \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435. \u041d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c, \u043d\u0430\u0434\u043e \u044d\u0442\u0438\u043c \u0441\u0430\u043c\u044b\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043d\u0430\u0431\u0434\u0438\u0442\u044c \u2014 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435\u043c (<i>HealthInitializer<\/i>). <a name=\"habracut\"><\/a><br \/>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <i>HealthInitializer<\/i>, \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <i>Particle.dictionary<\/i> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>\u00abhealth\u00bb<\/i><\/p>\n<pre><code class=\"actionscript\">package waylines.initializers { \timport org.flintparticles.common.particles.Particle; \timport org.flintparticles.common.emitters.Emitter; \timport org.flintparticles.common.initializers.InitializerBase;  \tpublic class HealthInitializer extends InitializerBase \t{ \t\tprivate var health:int; \t\tpublic function HealthInitializer(health:int=100) \t\t{ \t\t\tthis.health = health; \t\t} \t\toverride public function initialize( emitter : Emitter, particle : Particle ) : void \t\t{ \t\t\tparticle.dictionary[&quot;health&quot;] = health; \t\t} \t} } <\/code><\/pre>\n<p>  \u0427\u0430\u0441\u0442\u0438\u0446\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0435\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c.<br \/>  \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434:  <\/p>\n<ul>\n<li>\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e<\/li>\n<li>\u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 <i>MainWaylines_2.explosion<\/i><\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"actionscript\">override protected function setup(e:Event=null):void { \tsuper.setup(e); \t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c &quot;\u043c\u0435\u043b\u043a\u0438\u043c \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c&quot; \u043d\u043e\u0432\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e - \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435  \temitterWaylines.addInitializer( new HealthInitializer(100)); } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"actionscript\">\/*  * \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u0430 (\u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u0447\u0443\u0442\u044c \u0443\u0449\u0435\u0440\u0431\u043d\u0430 - \u043d\u043e \u044f \u043d\u0435 \u0443\u043a\u0430\u0436\u0443 \u0433\u0434\u0435)  * 1. \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 explosion &quot;\u0432\u044b\u0431\u0438\u0432\u0430\u0435\u0442&quot; \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0438\u0437 emitterWaylines \u0438 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0432 emitterExplosion  * 2. \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u0438\u043c \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435.   * \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e &quot;\u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f&quot; \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0412\u0421\u0415 \u0447\u0430\u0441\u0442\u0438\u0446\u044b   * - \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438 \u0442\u0435, \u0447\u0442\u043e \u0423\u0416\u0415 \u043d\u0430\u043a\u0440\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u0432\u0437\u0440\u044b\u0432\u043e\u043c   *\/ override protected function explosion(e:MouseEvent):void { \t\/* \t * \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 - \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0447\u0430\u0441\u0442\u0438\u0446 \u0438\u0437 emitterWaylines \t *\/ \tsuper.explosion(e); \t\/* \t * \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 copy-paste \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \t * , \u043d\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u0438\u0446 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \t *\/\t \t...  \tvar particles:Array = emitterExplosion.particlesArray; \tvar length:int = particles.length; \tfor(var r:int=0; r&lt;length; r++) \t{ \t\t...  \t\tif(Point.distance(explPoint, particlePoint) &lt; explRadius) \t\t{ \t\t\tparticleClone = Particle2D(particles[r]); \t\t\tparticleClone.angVelocity = -5 + Math.random() * 10; \t\t\t\/* \t\t\t * \u0447\u0443\u0442\u044c &quot;\u043f\u0440\u043e\u0434\u043b\u0435\u0432\u0430\u0435\u043c \u0436\u0438\u0437\u043d\u044c&quot; \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0432\u043e &quot;\u0432\u0437\u0440\u044b\u0432\u043d\u043e\u043c \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0435&quot; - \u0435\u0439 \u0432\u0435\u0434\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f... \t\t\t *\/\t\t\t\t\t \t\t\tparticleClone.lifetime += 1; \t\t\t\/\/particleClone.age = 0; \t\t\t\/* \t\t\t * \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435 \u0443 \u0447\u0430\u0441\u0442\u0438\u0446 \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0437\u0440\u044b\u0432\u0430 (\u043e\u0442 10 \u0434\u043e 40 \u0435\u0434\u0438\u043d\u0438\u0446) \t\t\t *\/ \t\t\tparticleClone.dictionary[&quot;health&quot;] -= (10 + Math.random() * 30); \t\t} \t}\t\t\t } <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u043e \u0440\u0430\u043d\u0438\u043b\u043e, \u0430 \u043a\u043e\u0433\u043e \u0438 \u0443\u0431\u0438\u043b\u043e. \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0446\u0432\u0435\u0442\u043e\u0432\u0443\u044e \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u0446\u0438\u044e <s>\u0448\u0442\u0430\u043d\u043e\u0432<\/s> \u0441\u0442\u0440\u0435\u043b\u043e\u043a.<br \/>  \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0443 \u0441\u0442\u0440\u043e\u043a \u0432 <i>MainWaylines_3.explosion()<\/i>:<\/p>\n<pre><code class=\"actionscript\">\/*  * \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e - \u0447\u0430\u0441\u0442\u0438\u0446\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u0430, \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f  *\/ if(particle.dictionary[&quot;health&quot;] &lt;= 0) {\t\/\/ \u0441\u0442\u0440\u0435\u043b\u043a\u0430 &quot;\u0443\u0431\u0438\u0442\u0430&quot; - \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043b\u044f\u043a\u0441\u0443 \taddBlot(particle); \t\/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u0438\u0446\u0443 \tparticle.isDead = true; } else { \/\/ \u0441\u0442\u0440\u0435\u043b\u043a\u0430 &quot;\u0440\u0430\u043d\u0435\u043d\u0430&quot; - \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0446\u0432\u0435\u0442 \tArrow(particle.image).color = getArrayColorByHealth(particle.dictionary[&quot;health&quot;]); } <\/code><\/pre>\n<p>  <b>\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<\/b><\/p>\n<p>  <a href=\"http:\/\/flintparticles.org\/\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0447\u0430\u0441\u0442\u0438\u0446<\/a>, \u0432\u0437\u044f\u0442\u0430\u044f \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c, \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0437\u0430\u043a\u043e\u043d\u0430\u043c\u0438 (\u043c\u0430\u0441\u0441\u0430, \u0433\u0440\u0430\u0432\u0438\u0442\u0430\u0446\u0438\u044f&#8230;) \u2014 \u0442\u043e\u043d\u043a\u0430\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u044f, \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0432\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 (\u043d\u0435 \u0442\u0435\u0445\u043d\u0430\u0440\u044c). \u0414\u0430 \u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u2014 \u0447\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e (\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0441 \u043f\u043e\u043a\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u0435\u0442\u0441\u043a\u0438\u043c\u0438 \u043a\u0443\u0431\u0438\u043a\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u0442\u043e\u0447\u0438\u0442\u044c \u043d\u0430 \u0442\u043e\u043a\u0430\u0440\u043d\u043e\u043c \u0441\u0442\u0430\u043d\u043a\u0435). <br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443:  <\/p>\n<ul>\n<li>\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0417\u0410\u041c\u0415\u0414\u041b\u0418\u041b \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u044b \u043d\u0430 \u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0443\u0436\u043d\u043e (\u0432 100 \u0440\u0430\u0437)<\/li>\n<li>\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 acceleration (\u0432 10 \u0440\u0430\u0437) <i> new MinimumDistance( 7, 6000 )<\/i><\/li>\n<li>\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b \u0441\u0438\u043b\u0443 \u00ab\u0430\u043d\u0438\u0433\u0440\u0430\u0432\u0438\u0442\u0430\u0446\u0438\u0438\u00bb (\u0432 10 \u0440\u0430\u0437) <i>new Antigravities(emitterWaylinesForMonsterArrows, -4000000) <\/i><\/li>\n<\/ul>\n<pre><code class=\"actionscript\">override protected function setup(e:Event=null):void { \tsuper.setup(e); \t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c &quot;\u043c\u0435\u043b\u043a\u0438\u043c \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c&quot; \u043d\u043e\u0432\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e - \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435  \temitterWaylines.addInitializer( new HealthInitializer(100)); \t\/* \t * &quot;\u0437\u0430\u043c\u0435\u0434\u043b\u0438\u043b \u0432\u0440\u0435\u043c\u044f&quot; \u0434\u043b\u044f \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u043e\u0432 \u0441\u0442\u0440\u0435\u043b\u043e\u043a (\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445) \t * \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e - .1 \t *\/ \temitterWaylines.maximumFrameTime = .001; \temitterWaylinesForMonsterArrows.maximumFrameTime = .001; \t\/* \t * \u0438\u0437-\u0437\u0430 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u043e\u0432 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0435\u043b\u043e\u043a, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u0438\u043b\u044b, \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \t * (\u043d\u0443, \u0434\u0430\u0436\u0435 \u0441 \u0436\u0438\u0442\u0435\u0439\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u044d\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e - \u0447\u0442\u043e\u0431 \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0441\u0438\u043b\u044b \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435) \t *\/ \temitterWaylines.addAction( new Antigravities(emitterWaylinesForMonsterArrows, -4000000) );\/\/ \u0431\u044b\u043b\u043e 400000 \temitterWaylines.addAction( new MinimumDistance( 7, 6000 ) );\/\/ \u0431\u044b\u043b\u043e 600 } <\/code><\/pre>\n<p>  \u041f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u0442\u0430\u043b \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u2014 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0441\u0432\u043e\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0440\u0442\u044b (\u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0433\u043e\u0431\u043b\u0438\u043d\u044b \u0438\u043b\u0438 \u0437\u043e\u043c\u0431\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440). \u0421\u0430\u043c\u0443 \u043a\u0430\u0440\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0447\u0430\u0441\u0442\u0438\u0446 \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u044b \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e (\u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432).<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/a6c\/13a\/29e\/a6c13a29e9b94c23a6879cbd66422f8d.png\"\/><\/p>\n<p>  \u041d\u0443 \u0432\u043e\u0442, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u0442\u043e, \u0447\u0435\u043c \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u2014 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u043b\u043f\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0421\u0438\u0441\u0442\u0435\u043c\u044b \u0427\u0430\u0441\u0442\u0438\u0446. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u041c\u043e\u0434\u0435\u043b\u0438 (MVC) \u0434\u043b\u044f Tower Defence. 60 fps, \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0447\u0430\u0441\u0442\u0438\u0446, \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f\u2026 \u041d\u043e \u2014 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0441\u0442\u044c \u043a\u0443\u0434\u0430 (\u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u043f\u043e\u043c\u044f\u043d\u0443\u043b), \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440 (Starling, Away3d)<\/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 MainWaylines_3<\/p>\n<p>  P.S.: \u0431\u0443\u0434\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043a\u0430\u0436\u0443 \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440    \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\/221197\/\"> http:\/\/habrahabr.ru\/post\/221197\/<\/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 10.04.2014 (<a href=\"http:\/\/habrahabr.ru\/post\/218697\/\">Particles System \u0432 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u043b\u043f\u044b(2)<\/a>).<\/p>\n<p>  <b>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438:<\/b>  <\/p>\n<ol>\n<li>\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)<\/li>\n<li>\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<\/li>\n<\/ol>\n<p>  <b>\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)<\/b><\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u00ab\u0443\u0431\u0438\u0442\u044c \u0441\u0442\u0440\u0435\u043b\u043a\u0443\u00bb, \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432. \u042f \u0436\u0435 \u0432\u044b\u0431\u0435\u0440\u0443 \u0441\u0430\u043c\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u2014 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0435 \u00ab\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f\u00bb \u0434\u043e \u043d\u0443\u043b\u044f \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435. \u041d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c, \u043d\u0430\u0434\u043e \u044d\u0442\u0438\u043c \u0441\u0430\u043c\u044b\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043d\u0430\u0431\u0434\u0438\u0442\u044c \u2014 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435\u043c (<i>HealthInitializer<\/i>). <\/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-221197","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/221197","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=221197"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/221197\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}