{"id":278621,"date":"2016-04-19T19:20:02","date_gmt":"2016-04-19T15:20:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=278621"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=278621","title":{"rendered":"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 HTML5-\u0438\u0433\u0440 \u0432 Intel XDK. \u0427\u0430\u0441\u0442\u044c 7. \u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0438\u0433\u0440\u044b"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/21b\/4e4\/f80\/21b4e4f80e884771bc6508cb0f5b6dbe.png\"\/><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281380\/\">\u0427\u0430\u0441\u0442\u044c 1<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281453\/\">\u0427\u0430\u0441\u0442\u044c 2<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281523\/\">\u0427\u0430\u0441\u0442\u044c 3<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281607\/\">\u0427\u0430\u0441\u0442\u044c 4<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281639\/\">\u0427\u0430\u0441\u0442\u044c 5<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281873\/\">\u0427\u0430\u0441\u0442\u044c 6<\/a> \u00bb \u0427\u0430\u0441\u0442\u044c 7<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/21b\/4e4\/f80\/21b4e4f80e884771bc6508cb0f5b6dbe.png\"\/><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u0438\u0433\u0440\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438\u0448\u044c \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u043a\u0440\u0430\u0441\u043e\u0442\u0443. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e: \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0430 \u043e\u0447\u043a\u043e\u0432, \u044d\u043a\u0440\u0430\u043d\u044b \u043c\u0435\u043d\u044e \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u044b, \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e. \u0412\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0438 \u0437\u0430\u0439\u043c\u0451\u043c\u0441\u044f. <\/p>\n<p>  <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281981\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/129\/e94\/3af\/129e943afa644431b02dc6b0c9a5a0d5.jpg\" \/><\/div>\n<p><\/a><a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#0071c5\">\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0430 \u043e\u0447\u043a\u043e\u0432<\/font><\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0430 \u043e\u0447\u043a\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0437\u043c\u0435\u044f \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u043f\u0435\u0447\u0435\u043d\u044c\u0435, \u0438\u0433\u0440\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0434\u043d\u043e \u043e\u0447\u043a\u043e. \u041f\u043e\u043c\u0438\u043c\u043e \u043d\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0447\u043a\u043e\u0432, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043b\u043e\u0439 ScoreLayer. \u0412 \u043d\u0451\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0432\u0441\u0451, \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a \u0438\u0433\u0440\u043e\u0432\u044b\u043c \u043e\u0447\u043a\u0430\u043c.<\/p>\n<p>  <b>1.<\/b> \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u00abscore.js\u00bb \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0444\u0430\u0439\u043b project.json.<\/p>\n<pre><code>&quot;jsList&quot; : [  \u00a0\u00a0\u00a0&quot;src\/resource.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/biscuit.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/score.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/game.js&quot; ]<\/code><\/pre>\n<p>  <b>2.<\/b> \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b score.js, \u0438\u043b\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u2013 \u0432 game.js.<\/p>\n<pre><code>var ScoreLayer = cc.Layer.extend({  \u00a0\u00a0\u00a0score: 0,  \u00a0\u00a0\u00a0labelScore: null,  \u00a0\u00a0\u00a0ctor: function() {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441\u0430 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this._super();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.init();  \u00a0\u00a0\u00a0},  \u00a0\u00a0\u00a0init: function() {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u043e\u0431 \u043e\u0447\u043a\u0430\u0445 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelScore = cc.LabelTTF.create(&quot;Score: 0&quot;);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelScore.setColor(cc.color(255, 255, 255, 255));  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelScore.setPosition(cc.p(240, 700));  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addChild(this.labelScore);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0},  \u00a0\u00a0\u00a0scoreIncrease: function() {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043e\u0447\u043a\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0441\u0442 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.score += 1;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelScore.setString(&quot;Score: &quot; + this.score);  \u00a0\u00a0\u00a0} });<\/code><\/pre>\n<p>  \u0421\u043b\u043e\u0439 \u044d\u0442\u043e\u0442 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0423 \u043d\u0435\u0433\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u043f\u0440\u0430\u0439\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u044b\u0432\u043e\u0434 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u043e \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u043a\u0430\u0445 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0438 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u043a\u043e\u0432 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0432\u044f\u0436\u0435\u043c \u0441\u043b\u043e\u0439, \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0437\u0430 \u043e\u0447\u043a\u0438, \u0441 \u0438\u0433\u0440\u043e\u0439.<\/p>\n<p>  <b>1.<\/b> \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 ScoreLayer \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 GameScene.<\/p>\n<pre><code>var GameScene = cc.Scene.extend({  \u00a0\u00a0\u00a0snake_layer: {}, \t score_layer: {},  \u00a0\u00a0\u00a0onEnter:function () {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this._super();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043a\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0443, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043d\u0438\u0436\u0435  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.score_layer = new ScoreLayer();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.snake_layer = new SnakeLayer();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043a\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0443, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043d\u0438\u0436\u0435  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addChild(this.score_layer, 1);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addChild(this.snake_layer, 0); \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0} });<\/code><\/pre>\n<p>  <b>2.<\/b> \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 SnakeLayer \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u0442\u043e\u0434 scoreIncrease \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0437\u043c\u0435\u044f \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u043f\u0435\u0447\u0435\u043d\u044c\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043d\u0435\u0441\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043c\u0435\u0442\u043e\u0434 checkCollision, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2013 \u0442\u0443\u0434\u0430, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0437\u043c\u0435\u0438 \u0441 \u043f\u0435\u0447\u0435\u043d\u044c\u0435\u043c.<\/p>\n<pre><code>checkCollision: function() {  \u00a0\u00a0\u00a0\u00a0\u00a0... \u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0441 \u043f\u0435\u0447\u0435\u043d\u044c\u0435\u043c *\/  \u00a0\u00a0\u00a0\u00a0\u00a0if (head.x == this.biscuit.x && head.y == this.biscuit.y) {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u043a\u043e\u0432 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.parent.score_layer.scoreIncrease();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043f\u0435\u0447\u0435\u043d\u044c\u044f *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.updateBiscuit();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u0438\u043d\u0443 \u0437\u043c\u0435\u0438 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addPart();  \u00a0\u00a0\u00a0\u00a0\u00a0}  \u00a0\u00a0\u00a0\u00a0\u00a0... \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },<\/code><\/pre>\n<p>  \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u043b\u043e\u044e, \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u0430 \u043e\u0447\u043a\u0438, \u0447\u0435\u0440\u0435\u0437 \u0441\u043b\u043e\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u0437\u043c\u0435\u044f, \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043e\u0431\u0449\u0435\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u2013 GameScene, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 scoreIncrease.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u044d\u043a\u0440\u0430\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/dfe\/d9e\/38f\/dfed9e38fc18f59c4868cfecabae1605.png\" \/><\/div>\n<p>  <font color=\"#999999\"><i>\u0421\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u043a\u0430\u0445 \u043d\u0430 \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435<\/i><\/font><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043c\u0435\u044f \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 \u043f\u0435\u0447\u0435\u043d\u044c\u0435, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u043a\u043e\u0432.<\/p>\n<h2><font color=\"#0071c5\">\u042d\u043a\u0440\u0430\u043d \u043c\u0435\u043d\u044e<\/font><\/h2>\n<p>  \u0417\u0430\u0439\u043c\u0451\u043c\u0441\u044f \u044d\u043a\u0440\u0430\u043d\u043e\u043c \u043c\u0435\u043d\u044e. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0442\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u043e\u0447\u043a\u0438. \u042d\u0442\u043e\u0442 \u044d\u043a\u0440\u0430\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0446\u0435\u043d\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u0434\u0432\u0430 \u0441\u043f\u0440\u0430\u0439\u0442\u0430. \u041e\u0434\u0438\u043d, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u0433\u0440\u044b, \u0432\u0442\u043e\u0440\u043e\u0439, \u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0439 \u0440\u043e\u043b\u044c \u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0449\u0451\u043b\u043a\u043d\u0443\u0442\u044c \u043c\u044b\u0448\u044c\u044e \u0438\u043b\u0438 \u043a\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f \u044d\u043a\u0440\u0430\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  1. \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u043d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0435\u0433\u043e \u00abmenu.js\u00bb. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 project.json \u0442\u0430\u043a, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435.<\/p>\n<pre><code>&quot;jsList&quot; : [  \u00a0\u00a0\u00a0&quot;src\/resource.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/biscuit.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/score.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/menu.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/game.js&quot; ]<\/code><\/pre>\n<p>  <b>2.<\/b> \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 menu.js, \u0438\u043b\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0432 game.js.<\/p>\n<pre><code>var MenuScene = cc.Scene.extend({  \u00a0\u00a0\u00a0titleSprite: {},  \u00a0\u00a0\u00a0subTitleSprite: {},  \u00a0\u00a0\u00a0onEnter: function() {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this._super();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var winSize = cc.view.getDesignResolutionSize();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.titleSprite = cc.LabelTTF.create(&quot;Snake.&quot;, &quot;Arial&quot;, 50);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.titleSprite.x = winSize.width \/ 2;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.titleSprite.y = winSize.height \/ 2;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addChild(this.titleSprite);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.subTitleSprite = cc.LabelTTF.create(&quot;Click anywhere to play&quot;, &quot;Arial&quot;, 20);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.subTitleSprite.x = winSize.width \/ 2;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.subTitleSprite.y = winSize.height \/ 2 - 80;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addChild(this.subTitleSprite);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u0433\u0440\u044b *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0cc.eventManager.addListener({  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0event: cc.EventListener.TOUCH_ONE_BY_ONE,  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0onTouchBegan: function (touches, event) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0cc.director.runScene(new GameScene()); \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}, this);  \u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0}, \u00a0\u00a0\u00a0 });<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u044d\u0442\u0443 \u0441\u0446\u0435\u043d\u0443 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u0432\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043f\u0440\u0430\u0439\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430 (\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432\u0432\u043e\u0434\u0430) \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0433\u0440\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u2013 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 GameScene.<\/p>\n<p>  3. \u0412 \u0444\u0430\u0439\u043b\u0435 main.js \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u0441\u0446\u0435\u043d\u0443 MenuScene \u0432\u043c\u0435\u0441\u0442\u043e GameScene. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043d\u0438\u0436\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code>cc.director.runScene(new GameScene());<\/code><\/pre>\n<p>  \u041e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code>cc.director.runScene(new MenuScene());<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0433\u0440\u0443 \u0432 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435, \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u044d\u043a\u0440\u0430\u043d \u043c\u0435\u043d\u044e.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/dc7\/280\/642\/dc728064224ed47abe27021e1410fb23.png\" \/><\/div>\n<p>  <font color=\"#999999\"><i>\u042d\u043a\u0440\u0430\u043d \u043c\u0435\u043d\u044e \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0433\u0440\u0443<\/i><\/font><\/p>\n<h2><font color=\"#0071c5\">\u042d\u043a\u0440\u0430\u043d \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u044b<\/font><\/h2>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043a\u0440\u0430\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u2013 \u044d\u0442\u043e \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u044b. \u041e\u043d \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e. \u041d\u0430 \u043d\u0451\u043c \u0431\u0443\u0434\u0443\u0442 \u0442\u0440\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043f\u0440\u0430\u0439\u0442\u0430. \u041e\u0434\u0438\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u00abGame Over\u00bb. \u0412\u0442\u043e\u0440\u043e\u0439 \u2013 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0441\u0435\u0430\u043d\u0441\u0435 \u0438\u0433\u0440\u044b \u043e\u0447\u043a\u0438, \u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0441\u044b\u0433\u0440\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430.<\/p>\n<p>  <b>1.<\/b> \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b, \u00abgameOver.js\u00bb. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 project.json:<\/p>\n<pre><code>&quot;jsList&quot; : [  \u00a0\u00a0\u00a0&quot;src\/resource.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/biscuit.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/score.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/gameOver.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/menu.js&quot;,  \u00a0\u00a0\u00a0&quot;src\/game.js&quot; ]<\/code><\/pre>\n<p>  <b>2.<\/b> \u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b gameOver.js, \u0438\u043b\u0438, \u0435\u0441\u043b\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u0432\u044b \u0435\u0433\u043e \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u2013 \u0432 game.js.<\/p>\n<pre><code>var GameOverScene = cc.Scene.extend({  \u00a0\u00a0\u00a0finalScore: 0,  \u00a0\u00a0\u00a0labelGameOver: {},  \u00a0\u00a0\u00a0labelScore: {},  \u00a0\u00a0\u00a0labelPrompt: {},  \u00a0\u00a0\u00a0ctor: function(score) {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this._super();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.finalScore = score;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a\u0430\u0441\u0430\u043d\u0438\u044f, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u044d\u043a\u0440\u0430\u043d \u043c\u0435\u043d\u044e *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0cc.eventManager.addListener({  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0event: cc.EventListener.TOUCH_ONE_BY_ONE,  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0onTouchBegan: function(touch, event) {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0cc.director.runScene(new MenuScene());  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}, this);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0},  \u00a0\u00a0\u00a0onEnter: function() {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this._super();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var winSize = cc.view.getDesignResolutionSize();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041d\u0430\u0434\u043f\u0438\u0441\u0438 \u0434\u043b\u044f \u0441\u0446\u0435\u043d\u044b GameOver *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelGameOver = new cc.LabelTTF(&quot;Game Over&quot;, &quot;Arial&quot;, 60); \u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelGameOver.x = winSize.width * 0.50;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelGameOver.y = winSize.height * 0.50;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addChild(this.labelGameOver);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041d\u0430\u0434\u043f\u0438\u0441\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u043a\u0430\u0445 *\/ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelScore = new cc.LabelTTF(&quot;Score: &quot; + this.finalScore, &quot;Arial&quot;, 30);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelScore.x = winSize.width * 0.50;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelScore.y = winSize.height * 0.43;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addChild(this.labelScore);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u044b\u0433\u0440\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelPrompt = new cc.LabelTTF(&quot;Click or Tap To Try Again&quot;);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelPrompt.x = winSize.width * 0.50;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.labelPrompt.y = winSize.height * 0.39;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addChild(this.labelPrompt);  \u00a0\u00a0\u00a0}, });<\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u0446\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u043a\u0430\u0445. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0441\u0446\u0435\u043d\u0430 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  <b>1.<\/b> \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0443 GameOverScene, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0443 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u043a\u0430\u0445. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0433\u043e\u043b\u043e\u0432\u044b \u0437\u043c\u0435\u0438 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0435\u0451 \u0442\u0435\u043b\u0430.<\/p>\n<pre><code>var SnakeLayer = cc.Layer.extend({ ...  \u00a0\u00a0\u00a0checkCollision: function() { \t ...  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u043c *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for (var part = 1; part &lt; body.length; part++) {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if (head.x == body[part].x && head.y == body[part].y) {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0446\u0435\u043d\u044b GameOver *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/this.snakeParts = null;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0438\u0436\u0435  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0cc.director.runScene(  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0new GameOverScene  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0(this.parent.score_layer.score)  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0} \u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...  \u00a0\u00a0\u00a0}, \t ... });<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0448\u0430, \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/pqouOOkSP2Ox7zK8lLIuZScGOAY4iuziC_qupeXjuMr_P_cgddGo6Kw9-3LGs1t6P7uu1GkZZS5-SXjp5LtWNslYiCWNcA9osfTG74w-ih6jh8qdVdaEkdx9wxSqu25o_nqKaeyvg4lQaNuRUg\" \/><\/div>\n<p>  <font color=\"#999999\"><i>\u042d\u043a\u0440\u0430\u043d \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u044b<\/i><\/font><\/p>\n<h2><font color=\"#0071c5\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0433\u0440\u044b<\/font><\/h2>\n<p>  \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0433\u0440\u044b, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0447\u043a\u043e\u0432 \u043d\u0430\u0431\u0440\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u0415\u0441\u043b\u0438 \u0437\u043c\u0435\u0439\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u0441 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e, \u0438\u0433\u0440\u0430\u0442\u044c \u0432 Snake \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u2013 \u0441\u043a\u0443\u0447\u043d\u043e.<\/p>\n<p>  <b>1.<\/b> \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043a\u043e\u0434 SnakeLayer \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<pre><code>updateDifficulty: function(curScore) { var scoreToDiff = {};  \/* \u0417\u0430\u0434\u0430\u0451\u043c \u0443\u0440\u043e\u0432\u043d\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0443\u0442\u0451\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0430\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u043a\u043e\u0432 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0437\u043c\u0435\u0438 *\/  scoreToDiff[0] = 0.15; scoreToDiff[5] = 0.10; scoreToDiff[15] = 0.05; scoreToDiff[25] = 0.03; scoreToDiff[35] = 0.01;  \/* \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b *\/ \t if (scoreToDiff[curScore] !== undefined) { this.interval = scoreToDiff[curScore]; } \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },<\/code><\/pre>\n<p>  <b>2.<\/b> \u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 updateDifficulty \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u0437\u043c\u0435\u044f \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u043f\u0435\u0447\u0435\u043d\u044c\u0435 \u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u043b\u043e\u044f SnakeLayer.<\/p>\n<pre><code>var SnakeLayer = cc.Layer.extend({  \u00a0\u00a0\u00a0...  \u00a0\u00a0\u00a0ctor: function () { \t  \u00a0...  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a\u043e\u0434 \u043d\u0438\u0436\u0435  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.updateDifficulty();  \u00a0\u00a0\u00a0}, \u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0...  \u00a0\u00a0\u00a0checkCollision: function() {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0441 \u043f\u0435\u0447\u0435\u043d\u044c\u0435\u043c *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if (head.x == this.biscuit.x && head.y == this.biscuit.y) {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043e\u0447\u043a\u0438 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.parent.score_layer.scoreIncrease();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043f\u0435\u0447\u0435\u043d\u044c\u044f *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.updateBiscuit();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u0438\u043d\u0443 \u0437\u043c\u0435\u0438 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.addPart();  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a\u043e\u0434 \u043d\u0438\u0436\u0435   \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/* \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0430\u0431\u0440\u0430\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0443\u0440\u043e\u0432\u043d\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0447\u043a\u043e\u0432 *\/  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.updateDifficulty(this.parent.score_layer.score);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0} \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \u00a0\u00a0\u00a0},  \u00a0\u00a0\u00a0... });<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#0071c5\">\u0412\u044b\u0432\u043e\u0434\u044b<\/font><\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u044b \u0443\u0437\u043d\u0430\u043b\u0438:<\/p>\n<ul>\n<li>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0440\u0430\u043d \u043c\u0435\u043d\u044e.<\/li>\n<li>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0440\u0430\u043d \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u044b.<\/li>\n<li>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0430 \u043e\u0447\u043a\u043e\u0432.<\/li>\n<li>\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0433\u0440\u044b.<\/li>\n<\/ul>\n<p>  \u0418\u0433\u0440\u0430 \u0433\u043e\u0442\u043e\u0432\u0430! \u041f\u0440\u0438\u043c\u0438\u0442\u0435 \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u0443\u0447\u0435\u0431\u043d\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430, \u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0432\u043e\u044e \u043f\u0435\u0440\u0432\u0443\u044e HTML5-\u0438\u0433\u0440\u0443 \u0432 Intel XDK! \u0418\u0441\u043f\u044b\u0442\u0430\u0439\u0442\u0435 \u0438\u0433\u0440\u0443, \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u0435, \u0432\u0441\u0451 \u043b\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0435\u0451 \u0442\u0430\u043a, \u043a\u0430\u043a \u0432\u0430\u043c \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u0410, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0432 \u0435\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0430\u043c \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0442\u0435\u0441\u044c \u0441 \u044d\u0442\u0438\u043c.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 \u0438\u0433\u0440\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c, \u0442\u0430\u043a\u0438\u0445, \u043a\u0430\u043a iOS, Android \u0438 Windows 8, \u0437\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/software.intel.com\/en-us\/xdk\/docs\/lp-build\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u043e Intel XDK<\/a>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u2013 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/21b\/4e4\/f80\/21b4e4f80e884771bc6508cb0f5b6dbe.png\"\/><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281380\/\">\u0427\u0430\u0441\u0442\u044c 1<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281453\/\">\u0427\u0430\u0441\u0442\u044c 2<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281523\/\">\u0427\u0430\u0441\u0442\u044c 3<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281607\/\">\u0427\u0430\u0441\u0442\u044c 4<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281639\/\">\u0427\u0430\u0441\u0442\u044c 5<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281873\/\">\u0427\u0430\u0441\u0442\u044c 6<\/a> \u00bb \u0427\u0430\u0441\u0442\u044c 7<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/21b\/4e4\/f80\/21b4e4f80e884771bc6508cb0f5b6dbe.png\"\/>       <\/p>\n<div class=\"clear\"><\/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=\"https:\/\/habrahabr.ru\/post\/281981\/\"> https:\/\/habrahabr.ru\/post\/281981\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/21b\/4e4\/f80\/21b4e4f80e884771bc6508cb0f5b6dbe.png\"\/><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281380\/\">\u0427\u0430\u0441\u0442\u044c 1<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281453\/\">\u0427\u0430\u0441\u0442\u044c 2<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281523\/\">\u0427\u0430\u0441\u0442\u044c 3<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281607\/\">\u0427\u0430\u0441\u0442\u044c 4<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281639\/\">\u0427\u0430\u0441\u0442\u044c 5<\/a> \u00bb <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281873\/\">\u0427\u0430\u0441\u0442\u044c 6<\/a> \u00bb \u0427\u0430\u0441\u0442\u044c 7<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/21b\/4e4\/f80\/21b4e4f80e884771bc6508cb0f5b6dbe.png\"\/><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u0438\u0433\u0440\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438\u0448\u044c \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u043a\u0440\u0430\u0441\u043e\u0442\u0443. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e: \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0430 \u043e\u0447\u043a\u043e\u0432, \u044d\u043a\u0440\u0430\u043d\u044b \u043c\u0435\u043d\u044e \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u044b, \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e. \u0412\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0438 \u0437\u0430\u0439\u043c\u0451\u043c\u0441\u044f. <\/p>\n<p>  <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/281981\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/129\/e94\/3af\/129e943afa644431b02dc6b0c9a5a0d5.jpg\" \/><\/div>\n<p><\/a><\/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-278621","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278621","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=278621"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278621\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}