{"id":278463,"date":"2016-04-17T20:15:03","date_gmt":"2016-04-17T16:15:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=278463"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=278463","title":{"rendered":"Unity \u0438 MVC: \u043a\u0430\u043a \u043f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438\u0433\u0440\u044b"},"content":{"rendered":"<br \/>\n<blockquote><p><b>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/b><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u042f \u043d\u0435\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0441\u0432\u0430\u0440\u0449\u0438\u043a \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u0430\u043b\u0441\u044f \u043c\u043d\u0435 \u0442\u044f\u0436\u0435\u043b\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0430\u0437\u043e\u0432\u0443 \u0435\u0433\u043e \u0432\u043e\u043b\u044c\u043d\u044b\u043c \u2014 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u0447\u0438\u0449\u0443 \u0441\u043e\u0432\u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0433\u0434\u0435-\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430, \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438 \u0438 \u0442.\u043f. \u0432 \u043b\u0438\u0447\u043a\u0443. <\/p>\n<p>  \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/www.toptal.com\">Toptal<\/a>, \u0433\u0434\u0435 \u0432\u044b\u043b\u043e\u0436\u0435\u043d \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0430\u0432\u0442\u043e\u0440\u0430 Eduardo Dias da Costa.<\/p><\/blockquote>\n<p>  <\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044f\u0442\u0441\u044f \u0441 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u0435\u0439, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Hello World. \u0417\u0430\u0442\u0435\u043c \u0441\u0442\u0430\u0432\u044f\u0442 \u0432\u0441\u0451 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0446\u0435\u043b\u0438 \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0432\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0432\u0430\u0436\u043d\u043e\u043c\u0443 \u0443\u0440\u043e\u043a\u0443: \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0435\u043a\u0442, \u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u0435\u0435 \u043a\u043e\u0434.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/16a\/c2d\/48c\/16ac2d48cb4b96a1ba90fa58f26dc627.jpg\" alt=\"image\"\/>  <\/p>\n<p>\u0418 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445, \u0438 \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043a\u043e\u0434\u0438\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u0435\u043c\u0443 \u0432\u0437\u0434\u0443\u043c\u0430\u0435\u0442\u0441\u044f. \u041a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u043c. \u0412\u0435\u0434\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0442\u0435\u0431\u0435 \u0432\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0433 \u0438\u043b\u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u043e\u0434. \u0414\u0430 \u0438 \u0442\u044b \u0432\u0440\u044f\u0434 \u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u0445\u043e\u0447\u0435\u0448\u044c.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f; \u043e\u043d\u0438 \u2014 \u0441\u0431\u043e\u0440\u043d\u0438\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443, \u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u043a\u043e\u0434\u043e\u043c.<a name=\"habracut\"><\/a><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d68\/6ea\/b49\/d686eab49ffdaecc83dfcb59cdccd235.jpg\" alt=\"image\"\/>  <\/p>\n<p>\u042d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443, \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e \u043f\u043e \u0441\u0442\u0430\u0440\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e. \u041c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u044f \u043a \u0441\u043b\u0443\u0447\u0430\u044e \u0440\u0430\u0437\u043d\u044f\u0442\u0441\u044f, \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u2014 \u043d\u0435 \u0441\u0435\u0440\u0435\u0431\u0440\u044f\u043d\u0430\u044f \u043f\u0443\u043b\u044f. \u041d\u0443\u0436\u043d\u043e \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u0430\u0431\u044b\u0435 \u0438 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u0432\u043e\u0451\u043c \u043e\u043f\u044b\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0438\u0433\u0440\u043e\u0432\u044b\u043c \u0434\u0432\u0438\u0436\u043a\u043e\u043c Unity3D \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u041c\u043e\u0434\u0435\u043b\u044c-\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 (Model-View-Controller, MVC). \u0417\u0430 \u0441\u0435\u043c\u044c \u043b\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u0431\u043e\u0440\u044c\u0431\u044b \u0441\u043e \u0441\u043f\u0430\u0433\u0435\u0442\u0442\u0438-\u043a\u043e\u0434\u043e\u043c \u0432 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u044f \u0434\u043e\u0431\u0438\u043b\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u0434\u0430 \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0443 \u0441 \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 Unity: \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c-\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 (Entity-Component, EC), \u0430 \u0437\u0430\u0442\u0435\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u043e\u0432\u0435\u0440\u0445 \u043d\u0435\u0433\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f MVC. \u0418 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442-\u043c\u0430\u043a\u0435\u0442. <\/p>\n<p>  <\/p>\n<h1>\u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445. \u042d\u0442\u0430 \u0441\u0432\u043e\u0431\u043e\u0434\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u2014 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043d\u0430\u0448\u043b\u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u0444\u0442\u0430. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u0432\u0443\u0445 \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: EC \u0438 MVC.<\/p>\n<p>  <\/p>\n<h1>\u0428\u0430\u0431\u043b\u043e\u043d \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c-\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/h1>\n<p>  <\/p>\n<p>\u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c-\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 (EC) \u2014 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0433\u0434\u0435 \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u0421\u0443\u0449\u043d\u043e\u0441\u0442\u0438), \u0430 \u0437\u0430\u0442\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 (\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b). \u0412 \u00ab\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435\u0440\u0441\u043a\u0438\u0445\u00bb \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445, \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0438\u0437 \u043d\u0443\u043b\u044f \u0438 \u0431\u043e\u043b\u0435\u0435 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u041e\u043f\u0438\u0448\u0435\u043c \u0435\u0451 \u0442\u0430\u043a: <code>some-entity [component0, component1, ...]<\/code><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 EC:<\/p>\n<p>  <\/p>\n<pre><code>- app [Application]    - game [Game]       - player [KeyboardInput, Renderer]       - enemies          - spider [SpiderAI, Renderer]          - ogre [OgreAI, Renderer]       - ui [UI]          - hud [HUD, MouseInput, Renderer]          - pause-menu [PauseMenu, MouseInput, Renderer]          - victory-modal [VictoryModal, MouseInput, Renderer]          - defeat-modal [DefeatModal, MouseInput, Renderer]<\/code><\/pre>\n<p>  <\/p>\n<p>EC \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u043d\u0438\u0432\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u0440\u043e\u0434\u0435 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Multiple_inheritance#The_diamond_problem\">\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0431\u0440\u0438\u043b\u043b\u0438\u0430\u043d\u0442\u0430 (the diamond problem)<\/a>: \u043a\u043b\u0430\u0441\u0441 D, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043e\u0442 B \u0438 C \u0441 \u043e\u0431\u0449\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c A, \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b \u0438\u0437-\u0437\u0430 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 A \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 B \u0438 C.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5d0\/7a9\/237\/5d07a92372bd4418a3de681b1a705613.jpg\" alt=\"image\"\/>  <\/p>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f. <\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c\u0441\u044f (attach) \u043a \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 \u0432 C# \u0438 JavaScript, \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Unity. <\/p>\n<p>  <\/p>\n<h3>\u0413\u0434\u0435 \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c-\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0435 \u043e\u043f\u0440\u0430\u0432\u0434\u044b\u0432\u0430\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0432\u044b\u0448\u0435 <acronym>\u041e\u041e\u041f<\/acronym>, EC \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0434\u0435\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043b\u0443\u0447\u0448\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043a\u043e\u0434\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u044b \u043e\u0441\u0442\u0430\u0451\u043c\u0441\u044f \u00ab\u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u043c\u0438\u00bb \u0438 \u0432 \u00ab\u043e\u043a\u0435\u0430\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439\u00bb \u043d\u0430\u043c \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0447\u043b\u0435\u043d\u0438\u0442\u044c \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u044b\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/bdd\/69d\/89a\/bdd69d89a2d84e5e1b11332603803662.jpg\" alt=\"image\"\/>  <\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0431\u0430\u0440\u0434\u0430\u043a\u0430 \u2014 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c \u043f\u043e\u0432\u0435\u0440\u0445 EC. \u042f \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u0442\u0440\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041e\u0434\u043d\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0441\u044b\u0440\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c, \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0438\u0445 (\u0442.\u0435. CRUD);<\/li>\n<li>\u0414\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435, \u043f\u0440\u0438\u043c. \u043f\u0435\u0440.) \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0438\u0445 \u0437\u043e\u043d\u043e\u0439 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0438 \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u044e\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0431 \u044d\u0442\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445;<\/li>\n<li>\u0422\u0440\u0435\u0442\u044c\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0440\u0435\u0448\u0430\u044e\u0442, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. <\/p>\n<p>  <\/p>\n<h1>\u0428\u0430\u0431\u043b\u043e\u043d \u041c\u043e\u0434\u0435\u043b\u044c-\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 (MVC)<\/h1>\n<p>  <\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c-\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u0442\u0440\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430: \u041c\u043e\u0434\u0435\u043b\u044c (CRUD), \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\/\u0414\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435) \u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 (\u0420\u0435\u0448\u0435\u043d\u0438\u0435\/\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435). MVC \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0438\u0431\u043e\u043a \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 EC \u0438 OOP.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0433\u0440 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0435\u0441\u0442\u044c \u043e\u0431\u044b\u0434\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430 \u0438\u043b\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445, \u0440\u0435\u0430\u043a\u0446\u0438\u0438 \u043d\u0430 \u043d\u0438\u0445 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 MVC.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f \u0432\u0432\u043e\u0434\u0438\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0439 \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043e\u0444\u0442\u0430 \u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0434\u0430\u0436\u0435 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c. \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044c \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/p>\n<p>  <\/p>\n<h1>Unity \u0438 EC<\/h1>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0431\u043b\u0438\u0436\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 Unity.<\/p>\n<p>  <\/p>\n<p>Unity \u2014 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 EC \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430, \u0433\u0434\u0435 \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u044e\u0442 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b <code>GameObject<\/code>, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 \u0432\u0438\u0434\u0438\u043c\u044b\u043c\u0438, \u0434\u0432\u0438\u0433\u0430\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0438 \u0442.\u0434. \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 <code>Component<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0430\u043d\u0435\u043b\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 (Hierarchy Panel) \u0438 \u0418\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440 (Inspector Panel) \u2014 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0437\u0430 \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0433\u0440\u044b. \u0411\u0435\u0437 \u043d\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u043a\u0443\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/bf1\/856\/516\/bf185651691db591083aee6c13e046d1.jpg\" alt=\"image\"\/>  <\/p>\n<p><em>\u041f\u0430\u043d\u0435\u043b\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 (Hierarchy Panel) \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f GameObject \u0441\u043f\u0440\u0430\u0432\u0430.<\/em><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/27e\/224\/52e\/27e22452e911e90037d36cb01e290db6.jpg\" alt=\"image\"\/>  <\/p>\n<p><em>\u0418\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440 (Inspector Panel) \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 GameObject.<\/em><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0432 \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u043e\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0441 \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u043d\u043e\u0439 \u0442\u0443\u0442 \u0438 \u0442\u0430\u043c \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u043e\u0439. <\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, MVC \u0432\u044b\u0440\u0443\u0447\u0438\u0442 \u043d\u0430\u0441: \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0438\u0445 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435:  <\/p>\n<p>  <\/p>\n<h3>\u0410\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f MVC \u0434\u043b\u044f \u0433\u0435\u0439\u043c\u0434\u0435\u0432\u0430<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439 \u043e\u0431\u0449\u0435\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 MVC, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u043c, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c \u0434\u043b\u044f Unity \u0441 MVC:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u044b MVC \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043a\u043e\u0434\u0443.<br \/> \n<ul>\n<li>\u0427\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0443, \u0432 Unity, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c (drag-n-drop) \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0435 (\u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u043c. \u043f\u0435\u0440.) \u0432\u044b\u0437\u043e\u0432\u044b <code>GetComponent(...)<\/code>.<\/li>\n<li>\u0415\u0441\u043b\u0438 Unity \u043a\u0440\u0430\u0448\u043d\u0443\u043b\u0430\u0441\u044c \u0438\u043b\u0438 \u0438\u0437-\u0437\u0430 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0431\u0430\u0433\u0430 \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u044b\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0441\u0441\u044b\u043b\u043a\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0438\u0439 \u0410\u0434. <\/li>\n<li>\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u0432 <strong>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<li>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044e\u0442 \u043b\u043e\u0433\u0438\u043a\u0443, \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0443\u044e\u0441\u044f \u043d\u0438 \u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 MVC \u0438 \u0447\u0430\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u042f \u043d\u0430\u0437\u043e\u0432\u0443 \u0438\u0445 <strong>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438<\/strong>. \u041e\u043d\u0438 \u0436\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c-\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043d\u043e \u0432 MV\u0421 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438.<br \/> \n<ul>\n<li>\u041f\u0440\u0438\u043c\u0435\u0440: \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>Rotator<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442. \u041d\u043e \u043d\u0435 \u0448\u043b\u0451\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u044f \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043b \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0438 \u043d\u0430\u0437\u0432\u0430\u043b \u0435\u0433\u043e <strong>AMVCC<\/strong> \u0438\u043b\u0438 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435-\u041c\u043e\u0434\u0435\u043b\u044c-\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440-\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 (Application-Model-View-Controller-Component).<br \/>  <img decoding=\"async\" src=\"https:\/\/assets.toptal.io\/uploads\/blog\/image\/91487\/toptal-blog-image-1438268986192-dc455bb88c34cd8c689ae9edb33f5eba.jpg\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<ul>\n<li><strong>Application<\/strong> \u2014 \u0435\u0434\u0438\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u043e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li><strong>MVC<\/strong> \u2014 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u044b \u0437\u043d\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \ud83d\ude42<\/li>\n<li><strong>Component<\/strong> \u2014 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u043c\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0441 \u043b\u0438\u0445\u0432\u043e\u0439. <\/p>\n<p>  <\/p>\n<h1>\u041f\u0440\u0438\u043c\u0435\u0440: 10 Bounces<\/h1>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d AMVCC \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u0438\u0433\u0440\u0435, \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0451 \u00ab10 Bounces\u00bb. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u0433\u0440\u044b \u043f\u0440\u043e\u0441\u0442\u044b: <code>Ball<\/code> \u0441\u043e <code>SphereCollider<\/code> \u0438 <code>Rigidbody<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u043d\u0451\u0442 \u043f\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0438\u0433\u0440\u044b; <code>Cube<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0435\u043c\u043b\u0438 \u0438 5 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f AMVCC.<\/p>\n<p>  <\/p>\n<h3>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043a\u043e\u0434\u0443, \u044f \u0441\u0434\u0435\u043b\u0430\u044e \u043d\u0430\u0431\u0440\u043e\u0441\u043e\u043a \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0430\u0441\u0441\u0435\u0442\u043e\u0432, \u0441\u043b\u0435\u0434\u0443\u044f \u0441\u0442\u0438\u043b\u044e AMVCC.<br \/>  <img decoding=\"async\" src=\"https:\/\/assets.toptal.io\/uploads\/blog\/image\/91488\/toptal-blog-image-1438269027508.2_10.42.25_AM-adaef24b99d08995ac47299b6960bde1.jpg\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>GameObject <code>view<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438 <code>View<\/code> \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u041e\u0431\u044a\u0435\u043a\u0442\u044b <code>model<\/code> \u0438 <code>controller<\/code> \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u0430 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u0432 \u043d\u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0437\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0442.\u0434. <\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a:<\/p>\n<p>  <\/p>\n<ul>\n<li><strong>\u0414\u0430\u043d\u043d\u044b\u043c<\/strong>: \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432 <code>application &gt; model &gt; ...<\/code><\/li>\n<li><strong>\u041b\u043e\u0433\u0438\u043a\u0435\/\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0440\u0430\u0431\u043e\u0442\u044b (workflow)<\/strong>: <code>application &gt; controller &gt; ...<\/code><\/li>\n<li><strong>\u0420\u0435\u043d\u0434\u0435\u0440\/\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\/\u0414\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>: <code>application &gt; view &gt; ...<\/code><br \/>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438\u043c \u0442\u0440\u0451\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u0441\u0442\u0430\u0440\u044b\u0435 (legasy) \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043d\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f <code>Component<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<h3>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432<\/h3>\n<p>  <\/p>\n<blockquote><p><strong>\u041e\u0431\u0440\u0430\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/strong>: \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435 \u2014 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0448\u044c \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435, <a href=\"https:\/\/bitbucket.org\/eduardo_costa\/thelab-unity-mvc\/overview\">\u0432\u043e\u0442 \u0441\u0441\u044b\u043b\u043a\u0430<\/a> \u043d\u0430 \u043c\u043e\u0439 MVC \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Unity MVC. \u041e\u043d \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0434 AMVCC, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043c \u0442\u044b \u043d\u0430\u0439\u0434\u0451\u0448\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p><\/blockquote>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u00ab10 Bounces\u00bb.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c Unity, \u044f \u043a\u0440\u0430\u0442\u043a\u043e \u043f\u043e\u044f\u0441\u043d\u044e, \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 GameObjects. \u00ab\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b\u00bb \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c-\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u043e\u043c <code>MonoBehaviour<\/code>. \u0427\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u0442\u0430\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u044c (drag-n-drop) \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430 GameObject (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u00ab\u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e\u00bb \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 EC) \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>AddComponent&lt;YourMonobehaviour&gt;()<\/code>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0433\u043e\u0442\u043e\u0432 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>  <\/p>\n<p><code>Application<\/code> (\u00abA\u00bb \u0432 AMVCC) \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0438\u043d\u0441\u0442\u0430\u043d\u0441, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u0438\u0433\u0440\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b. \u0412\u043d\u0443\u0442\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u0438\u043c \u0442\u0440\u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435: <code>model<\/code>, <code>view<\/code> \u0438 <code>controller<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0430\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c MVC.<\/p>\n<p>  <\/p>\n<p><code>Element<\/code> \u2014 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0434\u0430\u044e\u0449\u0438\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u043c MVC \u0434\u043e\u0441\u0442\u0443\u043f \u043a <code>Application<\/code>. <\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043c\u043d\u0438, \u0447\u0442\u043e \u043e\u0431\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u2014 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0438 <code>MonoBehaviour<\/code>. \u041e\u043d\u0438 \u2014 \u00ab\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b\u00bb, \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0451\u043d\u043d\u044b\u0435 \u043a GameObject \u00ab\u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u00bb. <\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ BounceApplication.cs  \/\/ Base class for all elements in this application. public class BounceElement : MonoBehaviour {    \/\/ Gives access to the application and all instances.    public BounceApplication app { get { return GameObject.FindObjectOfType&lt;BounceApplication&gt;(); }} }  \/\/ 10 Bounces Entry Point. public class BounceApplication : MonoBehaviour {    \/\/ Reference to the root instances of the MVC.    public BounceModel model;    public BounceView view;    public BounceController controller;     \/\/ Init things here    void Start() { } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u043e\u0442 <code>BounceElement<\/code> \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b MVC. \u041e\u0431\u044b\u0447\u043d\u043e <code>BounceModel<\/code>, <code>BounceView<\/code> \u0438 <code>BounceController<\/code> \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 MVC \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043d\u043e \u0432 \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430. \u041c\u043e\u0434\u0435\u043b\u0438 \u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 \u0445\u0432\u0430\u0442\u0438\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ BounceModel.cs  \/\/ Contains all data related to the app. public class BounceModel : BounceElement {    \/\/ Data    public int bounces;      public int winCondition; }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ BounceView .cs  \/\/ Contains all views related to the app. public class BounceView : BounceElement {    \/\/ Reference to the ball    public BallView ball; }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ BallView.cs  \/\/ Describes the Ball view and its features. public class BallView : BounceElement {    \/\/ Only this is necessary. Physics is doing the rest of work.    \/\/ Callback called upon collision.    void OnCollisionEnter() { app.controller.OnBallGroundHit(); } }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ BounceController.cs  \/\/ Controls the app workflow. public class BounceController : BounceElement {    \/\/ Handles the ball hit event    public void OnBallGroundHit()    {       app.model.bounces++;       Debug.Log(\u201cBounce \u201d+app.model.bounce);       if(app.model.bounces &gt;= app.model.winCondition)       {          app.view.ball.enabled = false;          app.view.ball.GetComponent&lt;RigidBody&gt;().isKinematic=true; \/\/ stops the ball          OnGameComplete();       }     }     \/\/ Handles the win condition    public void OnGameComplete() { Debug.Log(\u201cVictory!!\u201d); } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u044b, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0438\u0445 \u0437\u0430 GameObjects \u0438 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code>- application [BounceApplication]     - model [BounceModel]     - controller [BounceController]     - view [BounceView]         - ...         - ball [BallView]         - ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 Unity \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>BounceModel<\/code>:<br \/>  <img decoding=\"async\" src=\"https:\/\/assets.toptal.io\/uploads\/blog\/image\/91491\/toptal-blog-image-1438269533580.2-56f489174107c172be051385f7d274e8.jpg\" alt=\"image\"\/><br \/>  <em>BounceModel \u0441 \u043f\u043e\u043b\u044f\u043c\u0438 <code>bounces<\/code> \u0438 <code>winCondition<\/code>.<\/em><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u0433\u0440\u044b, \u0432\u044b\u0432\u043e\u0434 \u0432 \u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0438\u043c:<br \/>  <img decoding=\"async\" src=\"https:\/\/assets.toptal.io\/uploads\/blog\/image\/91489\/toptal-blog-image-1438269069944-03037d0a37cd8efd0e105123411ff0ce.jpg\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<h3>\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f (notifications)<\/h3>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0448\u0430\u0440 \u0443\u0434\u0430\u0440\u044f\u0435\u0442\u0441\u044f \u043e \u0437\u0435\u043c\u043b\u044e, \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>app.controller.OnBallGroundHit()<\/code>. \u041d\u0435\u043b\u044c\u0437\u044f \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u00ab\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439\u00bb \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043b\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043d\u043e \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043e\u043f\u044b\u0442\u0443 \u043a\u0443\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <code>Application<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u043c BounceApplication:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ BounceApplication.cs  class BounceApplication  {    \/\/ Iterates all Controllers and delegates the notification data    \/\/ This method can easily be found because every class is \u201cBounceElement\u201d and has an \u201capp\u201d     \/\/ instance.    public void Notify(string p_event_path, Object p_target, params object[] p_data)    {       BounceController[] controller_list = GetAllControllers();       foreach(BounceController c in controller_list)       {          c.OnNotification(p_event_path,p_target,p_data);       }    }     \/\/ Fetches all scene Controllers.    public BounceController[] GetAllControllers() { \/* ... *\/ } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u0433\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0439\u0442\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ BounceNotifications.cs  \/\/ This class will give static access to the events strings. class BounceNotification {    static public string BallHitGround = \u201cball.hit.ground\u201d;    static public string GameComplete  = \u201cgame.complete\u201d;    \/* ...  *\/    static public string GameStart     = \u201cgame.start\u201d;    static public string SceneLoad     = \u201cscene.load\u201d;    \/* ... *\/ }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u043e\u0431\u0449\u0435\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u043a\u043e\u0434\u0443 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0440\u043e\u0434\u0435 <code>controller.OnSomethingComplexName<\/code>. <\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u043c <code>BallView<\/code> \u0438 <code>BounceController<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ BallView.cs  \/\/ Describes the Ball view and its features. public class BallView : BounceElement {    \/\/ Only this is necessary. Physics is doing the rest of work.    \/\/ Callback called upon collision.    void OnCollisionEnter() { app.Notify(BounceNotification.BallHitGround,this); } }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ BounceController.cs  \/\/ Controls the app workflow. public class BounceController : BounceElement {    \/\/ Handles the ball hit event    public void OnNotification(string p_event_path,Object p_target,params object[] p_data)    {       switch(p_event_path)       {          case BounceNotification.BallHitGround:             app.model.bounces++;             Debug.Log(\u201cBounce \u201d+app.model.bounce);             if(app.model.bounces &gt;= app.model.winCondition)             {                app.view.ball.enabled = false;                app.view.ball.GetComponent&lt;RigidBody&gt;().isKinematic=true; \/\/ stops the ball                \/\/ Notify itself and other controllers possibly interested in the event                app.Notify(BounceNotification.GameComplete,this);                         }          break;           case BounceNotification.GameComplete:             Debug.Log(\u201cVictory!!\u201d);          break;       }     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 switch-case, \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432 \u043d\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<h1>AMVCC \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435<\/h1>\n<p>  <\/p>\n<p>\u00ab10 Bounces\u00bb \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 AMVCC. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0442\u0442\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0440\u0451\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 MVC \u0438 \u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438. <\/p>\n<p>  <\/p>\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u043c\u0438 \u0438 \u0447\u0430\u0441\u0442\u043e \u0441\u043e\u043c\u043d\u0435\u0432\u0430\u044e\u0442\u0441\u044f, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430 \u0438\u043b\u0438 \u0438\u043d\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c, \u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<h3>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 (\u043e\u0442 \u042d\u0434\u0443\u0430\u0440\u0434\u043e)<\/h3>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043d\u0435 \u00ab\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0438\u0434 \u043f\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 MVC\u00bb, \u0430 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043c\u043d\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u041c\u043e\u0434\u0435\u043b\u044c, \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u0440\u043e\u0434\u0443\u043c\u044b\u0432\u0430\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438\u043b\u0438 \u043f\u0438\u0448\u0443 \u0441\u043a\u0440\u0438\u043f\u0442.<\/p>\n<p>  <\/p>\n<h3>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h3>\n<p>  <\/p>\n<p><strong>\u041c\u043e\u0434\u0435\u043b\u0438<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f \u0438\u043b\u0438 \u0437\u0430\u043f\u0430\u0441\u0430 \u043f\u0430\u0442\u0440\u043e\u043d\u043e\u0432 \u0438\u0433\u0440\u043e\u043a\u0430.<\/li>\n<li>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f, \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0438\/\u0438\u043b\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0442\u0438\u043f\u0430\u043c\u0438.<\/li>\n<li>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\/\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043f\u043e \u0421\u0435\u0442\u0438).<\/li>\n<li>\u0421\u043e\u043e\u0431\u0449\u0430\u044e\u0442 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c \u043e \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/li>\n<li>\u0425\u0440\u0430\u043d\u044f\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u0438\u0433\u0440\u044b.<\/li>\n<li>\u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li>\u041c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u041c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0438\u0433\u0440\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u0442\u043e\u0434 \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f <code>player.Run()<\/code> \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>model.speed<\/code> \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0433\u0440\u043e\u043a\u0430.<\/li>\n<li>\u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u041c\u043e\u0434\u0435\u043b\u0438.<\/li>\n<li>\u0421\u0442\u0440\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<br \/> \n<ul>\n<li><code>PlayerView<\/code> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0432\u043e\u0434 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0438\u0433\u0440\u044b.<\/li>\n<li>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0447\u0451\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0438 \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0435\u0442 \u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445.<\/li>\n<li>\u041d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u043e\u0434\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f, \u0436\u0438\u0437\u043d\u0435\u0439 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li>\u041d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0433\u0440\u044b.<\/li>\n<li>\u041c\u043e\u0433\u0443\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439.<\/li>\n<li>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u041c\u043e\u0434\u0435\u043b\u0435\u0439.<\/li>\n<li>\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u043d\u0430 \u0441\u0446\u0435\u043d\u0435 Unity.<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h3>\n<p>  <\/p>\n<p>\u042f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u043a\u0430\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u0432 \u0438\u043b\u0438 \u044f\u0432\u043d\u043e \u043f\u0440\u043e\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f (\u0432\u0440\u043e\u0434\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 <code>Player<\/code> \u0432 MMO \u0438\u043b\u0438 \u0432\u0438\u0434\u043e\u0432 <code>Gun<\/code> \u0432 FPS). \u041d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043d\u0435 \u043c\u043e\u0433 \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u041c\u043e\u0434\u0435\u043b\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0433\u0440\u043e\u043a\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 <code>playerDataA, playerDataB ,\u2026<\/code> \u0438\u043b\u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u043e\u043a\u0430, \u2014 \u043c\u0435\u0442\u043e\u0434\u044b <code>OnPlayerDidA, OnPlayerDidB,\u2026<\/code> \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430 \u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u0432 <code>player<\/code> \u0438 <code>OnPlayer<\/code>. \u0422\u0430\u043a \u043a\u0430\u043a \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0449\u0435 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u044f \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u044d\u0442\u043e \u043d\u0430 \u0435\u0451 \u043f\u0440\u0438\u043c\u0435\u0440\u0435. <\/p>\n<p>  <\/p>\n<p>\u042f \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u041c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0433\u0440\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ Model.cs  class Model {    public float playerHealth;    public int playerLives;     public GameObject playerGunPrefabA;    public int playerGunAmmoA;     public GameObject playerGunPrefabB;    public int playerGunAmmoB;     \/\/ Ops Gun[C D E ...] will appear...    \/* ... *\/     public float gameSpeed;    public int gameLevel; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u0447\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438\u0433\u0440\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u041f\u0440\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043c\u044b \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0439 \u043a\u043b\u0430\u0441\u0441, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 model.playerABCDFoo. \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u044f\u0442 \u043a\u043e\u0434 \u0438 \u0434\u0430\u0434\u0443\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ Model.cs  class Model {    public PlayerModel player;  \/\/ Container of the Player data.    public GameModel game;      \/\/ Container of the Game data. }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ GameModel.cs  class GameModel {    public float speed;         \/\/ Game running speed (influencing the difficulty)    public int level;           \/\/ Current game level\/stage loaded }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ PlayerModel.cs  class PlayerModel {    public float health;        \/\/ Player health from 0.0 to 1.0.    public int lives;           \/\/ Player \u201cretry\u201d count after he dies.    public GunModel[] guns;     \/\/ Now a Player can have an array of guns to switch ingame. }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/ GunModel.cs  class GunModel {    public GunType type;        \/\/ Enumeration of Gun types.    public GameObject prefab;   \/\/ Template of the 3D Asset of the weapon.    public int ammo;            \/\/ Current number of bullets    public int clips;           \/\/ Number of reloads possible }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0437\u0430 \u0440\u0430\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0447\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430. \u0414\u0430\u0432\u0430\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0448\u0443\u0442\u0435\u0440 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043b\u0438\u0446\u0430 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u043e\u0440\u0443\u0436\u0438\u044f. \u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <code>GunModel<\/code>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0435\u0444\u0430\u0431\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0438\u0434\u0430 \u043e\u0440\u0443\u0436\u0438\u044f \u0438 \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0438\u0433\u0440\u0435. \u041f\u0440\u0435\u0444\u0430\u0431 \u2014 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 GameObject, \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0440\u0443\u0436\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u0440\u043e\u0434\u0435 <code>gun0Ammo<\/code>, <code>gun1Ammo<\/code>, <code>gun0Clips<\/code> \u0438 \u0442.\u0434., \u0442\u043e\u0433\u0434\u0430, \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0432\u0448\u0438\u0441\u044c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 <code>Gun<\/code>, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c <code>Model<\/code> \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e <code>Player<\/code>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>GunModel<\/code>.<br \/>  <img decoding=\"async\" src=\"https:\/\/assets.toptal.io\/uploads\/blog\/image\/91490\/toptal-blog-image-1438269131871-fb7c3ac197fa95c295996b4b819b4fef.jpg\" alt=\"image\"\/><br \/>  <em>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/em><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043c\u0435\u0434\u0430\u043b\u0438. \u0418\u043d\u043e\u0433\u0434\u0430 \u0438\u0437\u043b\u0438\u0448\u043d\u0435\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u043a\u043e\u0434. \u0422\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u044b\u0442 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c MVC \u0432 \u0442\u0432\u043e\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>  <\/p>\n<blockquote><p>\u041e\u0442\u043a\u0440\u044b\u0442 \u043d\u043e\u0432\u044b\u0439 \u043d\u0430\u0432\u044b\u043a \u0433\u0435\u0439\u043c\u0434\u0435\u0432\u0430: Unity \u0441 MVC.<\/p><\/blockquote>\n<p>  <\/p>\n<h1>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043e\u043f\u044b\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0432\u043f\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u043d\u0438\u044f \u0438 \u0445\u043e\u0442\u044f\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043c \u0441\u0442\u0430\u043b\u043e \u0441\u0442\u0443\u043f\u0435\u043d\u044c\u044e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0442\u0432\u043e\u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438 \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435. \u041d\u0430\u0447\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/\u0428\u0430\u0431\u043b\u043e\u043d_\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\">\u0441\u0442\u0430\u0442\u044c\u0438 \u0432 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438<\/a>, \u0442\u0430\u043c \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438 \u0438\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u0431\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d AMVCC, \u0438 \u0442\u044b \u0445\u043e\u0447\u0435\u0448\u044c \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/bitbucket.org\/eduardo_costa\/thelab-unity-mvc\/overview\">Unity MVC<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0438\u043b\u0435 AMVCC.<\/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\/281783\/\"> https:\/\/habrahabr.ru\/post\/281783\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<blockquote><p><b>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/b><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u042f \u043d\u0435\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0441\u0432\u0430\u0440\u0449\u0438\u043a \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u0430\u043b\u0441\u044f \u043c\u043d\u0435 \u0442\u044f\u0436\u0435\u043b\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0430\u0437\u043e\u0432\u0443 \u0435\u0433\u043e \u0432\u043e\u043b\u044c\u043d\u044b\u043c \u2014 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u0447\u0438\u0449\u0443 \u0441\u043e\u0432\u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0433\u0434\u0435-\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430, \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438 \u0438 \u0442.\u043f. \u0432 \u043b\u0438\u0447\u043a\u0443. <\/p>\n<p>  \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/www.toptal.com\">Toptal<\/a>, \u0433\u0434\u0435 \u0432\u044b\u043b\u043e\u0436\u0435\u043d \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0430\u0432\u0442\u043e\u0440\u0430 Eduardo Dias da Costa.<\/p><\/blockquote>\n<p>  <\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044f\u0442\u0441\u044f \u0441 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u0435\u0439, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Hello World. \u0417\u0430\u0442\u0435\u043c \u0441\u0442\u0430\u0432\u044f\u0442 \u0432\u0441\u0451 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0446\u0435\u043b\u0438 \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0432\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0432\u0430\u0436\u043d\u043e\u043c\u0443 \u0443\u0440\u043e\u043a\u0443: \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0435\u043a\u0442, \u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u0435\u0435 \u043a\u043e\u0434.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/16a\/c2d\/48c\/16ac2d48cb4b96a1ba90fa58f26dc627.jpg\" alt=\"image\"\/>  <\/p>\n<p>\u0418 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445, \u0438 \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043a\u043e\u0434\u0438\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u0435\u043c\u0443 \u0432\u0437\u0434\u0443\u043c\u0430\u0435\u0442\u0441\u044f. \u041a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u043c. \u0412\u0435\u0434\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0442\u0435\u0431\u0435 \u0432\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0433 \u0438\u043b\u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u043e\u0434. \u0414\u0430 \u0438 \u0442\u044b \u0432\u0440\u044f\u0434 \u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u0445\u043e\u0447\u0435\u0448\u044c.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f; \u043e\u043d\u0438 \u2014 \u0441\u0431\u043e\u0440\u043d\u0438\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443, \u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u043a\u043e\u0434\u043e\u043c.<\/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-278463","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278463","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=278463"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278463\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}