{"id":197920,"date":"2013-10-17T12:06:03","date_gmt":"2013-10-17T08:06:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=197920"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=197920","title":{"rendered":"<span class=\"post_title\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Entity System Framework \u0438 \u0437\u0430\u0447\u0435\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d \u0432 \u0433\u0435\u0439\u043c\u0434\u0435\u0432\u0435?<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u0433\u0440\u044b \u0441 \u043d\u0443\u043b\u044f, \u043d\u043e \u043c\u0430\u043b\u043e \u0441\u0442\u0430\u0442\u0435\u0439, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0441\u0432\u043e\u044f \u043b\u044e\u0431\u0438\u043c\u0430\u044f \u043f\u043e\u0434\u0435\u043b\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0430\u0441\u044c \u0432\u043e \u0424\u0440\u0430\u043d\u043a\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430 \u0438 \u0434\u043e\u0448\u043b\u0430 \u0434\u043e \u0432\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u0410\u0432\u0442\u043e\u0440 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u043e\u0434 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430 \u043e\u0442 \u043a\u0443\u0447\u0438 \u0445\u043b\u0430\u043c\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043a \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0439, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0439 Entity Component System. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0447\u0442\u0438 \u0432\u0435\u0441\u044c \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u2014 \u043d\u043e \u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u0435\u0433\u043e \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441 \u043d\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u043e\u0441\u0438\u0442 \u0430\u0432\u0442\u043e\u0440 \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432, \u0432\u0440\u043e\u0434\u0435 \u043c\u0435\u043d\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0447\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u00ab\u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u044b\u0445\u00bb \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0437\u043d\u0430\u044e\u0442, \u043a\u0430\u043a \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0445 \u043a\u043e\u0434\u0435.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430:<\/b><\/p>\n<div class=\"spoiler_text\">\u042f \u043d\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a. \u042f \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u0441\u043d\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043a\u0430\u043b \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0438\u0433\u0440\u0443 \u0438 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u0441 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432, \u0447\u0442\u043e \u043e \u043d\u0435\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435. \u042f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043b \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u044b \u0438 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u0438\u0435\u043c \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043b\u0435\u0433\u043a\u043e\u0433\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0433\u043e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0442\u0430\u043a\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u041a\u043e\u0440\u043e\u0447\u0435, \u044f \u0438\u0437\u0432\u0438\u043d\u044f\u044e\u0441\u044c, \u0435\u0441\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u044f\u0432\u043e\u0439 \u0438 \u043a\u0440\u0438\u0432\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e\u0439. \u042f \u0447\u0435\u0441\u0442\u043d\u043e \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \ud83d\ude42  <\/div>\n<\/div>\n<p>  \u041d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u044f \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b <a href=\"http:\/\/www.ashframework.org\/\">Ash<\/a> \u2014 Entity System \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0433\u0440 \u043d\u0430 Actionscript \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043b\u044e\u0434\u0438 \u0437\u0430\u0434\u0430\u043b\u0438 \u043c\u043d\u0435 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Entity System Framework?\u00bb. \u0412\u043e\u0442 \u043c\u043e\u0439 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<p>  Entity-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u0432\u0435\u0449\u0430\u043c \u0432\u0440\u043e\u0434\u0435 Unity \u0438 \u043c\u0435\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c\u0438 ActionScript \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 \u0432\u0440\u043e\u0434\u0435 Ember2, Xember \u0438 \u043c\u043e\u0438\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c Ash. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b: \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0438\u0433\u0440\u044b, \u043f\u043e\u043e\u0449\u0440\u044f\u044e\u0449\u0430\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u0434\u0435, \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>  \u042d\u0442\u0438\u043c \u043f\u043e\u0441\u0442\u043e\u043c \u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u0445 (Entity) \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u043c\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \u042d\u0442\u043e \u0437\u0430\u0439\u043c\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430 Actionscript, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043d\u043e \u0441\u0430\u043c\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0431\u0443\u0434\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438\u0433\u0440\u0443 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Asteroids_(video_game)\">Asteroids<\/a>. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0410\u0441\u0442\u0435\u0440\u043e\u0438\u0434\u044b \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438\u0433\u0440\u0430\u0445 \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0430, \u0444\u0438\u0437\u0438\u043a\u0438, \u0418\u0418, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0438\u0433\u0440\u043e\u043a\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u043d\u0435-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043e\u0431\u044c\u0435\u043a\u0442\u044b.<\/p>\n<h4>\u0418\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0437\u0430\u0447\u0435\u043c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0447\u0435\u0442\u043a\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0440\u044b\u0439, \u0434\u043e\u0431\u0440\u044b\u0439 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Game_programming#Game_structure\">\u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b<\/a>. \u0414\u043b\u044f \u0410\u0441\u0442\u0435\u0440\u043e\u0438\u0434\u043e\u0432 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:   <\/p>\n<pre><code class=\"actionscript\">function update( time:Number ):void {   game.update( time );   spaceship.updateInputs( time );   for each( var flyingSaucer:FlyingSaucer in flyingSaucers )   {     flyingSaucer.updateAI( time );   }   spaceship.update( time );   for each( var flyingSaucer:FlyingSaucer in flyingSaucers )   {     flyingSaucer.update( time );   }   for each( var asteroid:Asteroid in asteroids )   {     asteroid.update( time );   }   for each( var bullet:Bullet in bullets )   {     bullet.update( time );   }   collisionManager.update( time );   spaceship.render();   for each( var flyingSaucer:FlyingSaucer in flyingSaucers )   {     flyingSaucer.render();   }   for each( var asteroid:Asteroid in asteroids )   {     asteroid.render();   }   for each( var bullet:Bullet in bullets )   {     bullet.render();   } } <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c, \u043e\u0431\u044b\u0447\u043d\u043e 60 \u0438\u043b\u0438 30 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0433\u0440\u0443. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0432\u0430\u0436\u0435\u043d, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0438 \u0437\u0430\u0442\u0435\u043c \u0438\u0445 \u0432\u0441\u0435\u0445 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440.<br \/>  \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443:<br \/>  1. \u0418\u0433\u0440\u0430 \u043f\u0440\u043e\u0441\u0442\u0430 \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435.<br \/>  2. \u0418\u0433\u0440\u0430 \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<br \/>  \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c, \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0433\u0440\u0430\u043c\u0438, \u0433\u0434\u0435 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0438\u0437 \u0431\u043e\u043b\u0435\u0435 3000 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0433\u043b\u0443\u043f\u043e. \u041d\u043e \u044d\u0442\u043e \u0431\u044b\u043b \u0441\u043f\u043e\u0441\u043e\u0431, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0438\u0433\u0440\u044b \u0438 \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441 \u044d\u0442\u0438\u043c \u0436\u0438\u0442\u044c.<br \/>  \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0438\u0441\u0442\u0435\u043c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u0448\u043b\u0430 \u0438\u0437 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \u041e\u043d\u0430 \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b \u044f\u0434\u0440\u043e\u043c \u0438\u0433\u0440\u044b \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0432\u0430\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0433\u0440\u044b. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0438\u0434 \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443.<\/p>\n<h4>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u044b<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u0432 \u044d\u0442\u043e\u0439 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438. \u042d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0442\u044c\u0441\u044f. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"actionscript\">interface IProcess {   function start():Boolean;   function update( time:Number ):void;   function end():void; } <\/code><\/pre>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0437\u0430 \u0440\u0435\u043d\u0434\u0435\u0440, \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0439. \u0427\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.  <\/p>\n<pre><code class=\"actionscript\">class ProcessManager {   private var processes:PrioritisedList;    public function addProcess( process:IProcess, priority:int ):Boolean   {     if( process.start() )     {       processes.add( process, priority );       return true;     }     return false;   }    public function update( time:Number ):void   {     for each( var process:IProcess in processes )     {       process.update( time );     }   }    public function removeProcess( process:IProcess ):void   {     process.end();     processes.remove( process );   } } <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043d\u0435\u043a\u0430\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 add) \u0438 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \u041d\u043e \u044d\u0442\u0430 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0441\u0430\u043c\u0443 \u0438\u0434\u0435\u044e. \u0415\u0441\u043b\u0438 \u043d\u0430\u0448 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b \u0440\u0430\u0437\u0431\u0438\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0442\u043e\u0433\u0434\u0430 \u043c\u0435\u0442\u043e\u0434 update \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0443\u0436\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u044f\u0434\u0440\u043e\u043c \u0438\u0433\u0440\u044b.<\/p>\n<h4>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0435\u043d\u0434\u0435\u0440\u0430<\/h4>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0435\u043d\u0434\u0435\u0440\u0430. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u043a\u043e\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u0438\u0437 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e:  <\/p>\n<pre><code class=\"actionscript\">class RenderProcess implements IProcess {   public function start() : Boolean   {     \/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0430     return true;   }    public function update( time:Number ):void   {     spaceship.render();     for each( var flyingSaucer:FlyingSaucer in flyingSaucers )     {       flyingSaucer.render();     }     for each( var asteroid:Asteroid in asteroids )     {       asteroid.render();     }     for each( var bullet:Bullet in bullets )     {       bullet.render();     }   }      public function end() : void   {     \/\/ \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0430   } } <\/code><\/pre>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b<\/h4>\n<p>  \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u041c\u044b \u0432\u0441\u0435 \u0435\u0449\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0438\u0434\u044b \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u0431\u044b \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b \u043e\u0431\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u0441\u0435\u0445 \u0432\u0438\u0434\u0438\u043c\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043c\u044b \u0431\u044b \u043c\u043e\u0433\u043b\u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c  <\/p>\n<pre><code class=\"actionscript\">interface IRenderable {   function render(); }  class RenderProcess implements IProcess {   private var targets:Vector.&lt;IRenderable&gt;;    public function start() : Boolean   {     \/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0430     return true;   }    public function update( time:Number ):void   {     for each( var target:IRenderable in targets )     {       target.render();     }   }      public function end() : void   {     \/\/ \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0430   } } <\/code><\/pre>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u043a\u043b\u0430\u0441\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0440\u0430\u0431\u043b\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"actionscript\">class Spaceship implements IRenderable {   public var view:DisplayObject;   public var position:Point;   public var rotation:Number;    public function render():void   {     view.x = position.x;     view.y = position.y;     view.rotation = rotation;   } } <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u0434\u0438\u0441\u043f\u0435\u0439\u043d\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u0430\u0445 Flash. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u0443\u0444\u0435\u0440\u0430 \u0438\u043b\u0438 stage3d, \u043e\u043d \u0431\u044b\u043b \u0431\u044b \u0434\u0440\u0443\u0433\u0438\u043c, \u043d\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0431\u0443\u0434\u0443\u0442 \u0442\u0435 \u0436\u0435. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0438 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0435\u0435 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c. \u0418 \u0444\u0443\u043d\u043a\u0446\u0438\u044f render, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0430\u044f \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u041f\u043e \u0444\u0430\u043a\u0442\u0443, \u0432 \u043a\u043e\u0434\u0435 \u043a\u043e\u0440\u0430\u0431\u043b\u044f \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u0412\u0435\u0441\u044c \u0435\u0433\u043e \u043a\u043e\u0434 \u043c\u043e\u0433 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0432\u0438\u0434\u0438\u043c\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0449\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0445 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442 \u044d\u0442\u043e display object, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 view, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0438 \u0443\u0433\u043e\u043b \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u0435\u0440\u043d\u0435\u043c \u044d\u0442\u043e \u0432 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435.  <\/p>\n<pre><code class=\"actionscript\">class Renderable implements IRenderable {   public var view:DisplayObject;   public var position:Point;   public var rotation:Number;    public function render():void   {     view.x = position.x;     view.y = position.y;     view.rotation = rotation;   } } class Spaceship extends Renderable { } <\/code><\/pre>\n<p>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0432\u0441\u0435 \u0440\u0438\u0441\u0443\u0435\u043c\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u044d\u0442\u043e\u0439:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/89e\/7cc\/091\/89e7cc09188edf7daff2fbe8b4bcb575.png\" alt=\"image\"\/><\/p>\n<h4>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433, \u0441\u043f\u0435\u0440\u0432\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438 \u043a\u043b\u0430\u0441\u0441, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432  <\/p>\n<pre><code class=\"actionscript\">interface IMoveable {   function move( time:Number ); }  class MoveProcess implements IProcess {   private var targets:Vector.&lt;IMoveable&gt;;      public function start():Boolean   {     return true;   }    public function update( time:Number ):void   {     for each( var target:IMoveable in targets )     {       target.move( time );     }   }      public function end():void   {   } }  class Moveable implements IMoveable {   public var position:Point;   public var rotation:Number;   public var velocity:Point;   public var angularVelocity:Number;    public function move( time:Number ):void   {     position.x += velocity.x * time;     position.y += velocity.y * time;     rotation += angularVelocity * time;   } }  class Spaceship extends Moveable { } <\/code><\/pre>\n<h4>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u042d\u0442\u043e \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u043a\u043e\u0440\u0430\u0431\u043b\u044c \u0438 \u0434\u0432\u0438\u0433\u0430\u043b\u0441\u044f \u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u043b\u0441\u044f, \u043d\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435. \u0418 \u0434\u0430\u0436\u0435 \u0432 \u0442\u0435\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442, \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0438 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0432 Movable \u043a\u043b\u0430\u0441\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0442\u0435\u043c \u0436\u0435, \u0447\u0442\u043e \u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 Renderable.<br \/>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 Movable \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c Renderable.  <\/p>\n<pre><code class=\"actionscript\">class Moveable extends Renderable implements IMoveable {   public var velocity:Point;   public var angularVelocity:Number;    public function move( time:Number ):void   {     position.x += velocity.x * time;     position.y += velocity.y * time;     rotation += angularVelocity * time;   } }  class Spaceship extends Moveable { } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u0440\u0430\u0431\u043b\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0438 \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f, \u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0435 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0438 \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u0438\u0433\u0440\u043e\u0432\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ee7\/71b\/02d\/ee771b02da63bb8040940a3a2662a005.png\" alt=\"image\"\/><\/p>\n<p>  \u041c\u044b \u0434\u0430\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0442 Renderable.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/4f4\/bef\/631\/4f4bef631cc7b866c3f968d9ed5498dc.png\" alt=\"image\"\/><\/p>\n<h4>Moveable, \u043d\u043e \u043d\u0435 Renderable<\/h4>\n<p>  \u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0434\u0432\u0438\u0436\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f? \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u0435 \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b? \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0448\u0430 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 Movable, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 Renderable.  <\/p>\n<pre><code class=\"actionscript\">class InvisibleMoveable implements IMoveable {   public var position:Point;   public var rotation:Number;   public var velocity:Point;   public var angularVelocity:Number;    public function move( time:Number ):void   {     position.x += velocity.x * time;     position.y += velocity.y * time;     rotation += angularVelocity * time;   } } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a94\/017\/75d\/a9401775d81db5a88bc331a571449de4.png\" alt=\"image\"\/><br \/>  \u0412 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u0433\u0440\u0435 \u044d\u0442\u043e \u0433\u0440\u044f\u0437\u043d\u043e, \u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e, \u0430 \u0432 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0438\u0433\u0440\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u0434 \u043d\u0435\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c \u0438 \u0441\u043a\u043e\u0440\u043e \u0432\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u0435 \u0432\u0435\u0449\u0438 \u0432 \u0438\u0433\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0432\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u0440\u043e\u0434\u0435 \u0442\u0435\u0445, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432\u044b\u0448\u0435.<\/p>\n<h4>\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e.<\/h4>\n<p>  \u0415\u0441\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u041e\u041e\u041f: <a href=\"http:\/\/en.wikipedia.org\/wiki\/Composition_over_inheritance\">\u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e<\/a>. \u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u043f\u0430\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u044b \u0432 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438.<br \/>  \u041d\u0430\u043c \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0443\u0436\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u044b Renderable \u0438 Movable, \u043d\u043e, \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0440\u0430\u0431\u043b\u044f, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u0440\u0430\u0431\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.  <\/p>\n<pre><code class=\"actionscript\">class Renderable implements IRenderable {   public var view:DisplayObject;   public var position:Point;   public var rotation:Number;    public function render():void   {     view.x = position.x;     view.y = position.y;     view.rotation = rotation;   } }  class Moveable implements IMoveable {   public var position:Point;   public var rotation:Number;   public var velocity:Point;   public var angularVelocity:Number;    public function move( time:Number ):void   {     position.x += velocity.x * time;     position.y += velocity.y * time;     rotation += angularVelocity * time;   } }  class Spaceship {   public var renderData:IRenderable;   public var moveData:IMoveable; } <\/code><\/pre>\n<p>  \u042d\u0442\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/978\/5ec\/c64\/9785ecc6430b1dd7021feed34225c3ec.png\" alt=\"image\"\/><br \/>  \u042d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438: Static Object, Spaceship, Flying Saucer, Asteroid \u0438 Force Field \u2014 \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 (Entities).<br \/>  \u041d\u0430\u0448\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f  <\/p>\n<pre><code class=\"actionscript\">interface IRenderable {   function render(); }  class RenderProcess implements IProcess {   private var targets:Vector.&lt;IRenderable&gt;;    public function update(time:Number):void   {     for each(var target:IRenderable in targets)     {       target.render();     }   } }  interface IMoveable {   function move(); }  class MoveProcess implements IProcess {   private var targets:Vector.&lt;IMoveable&gt;;    public function update(time:Number):void   {     for each(var target:IMoveable in targets)     {       target.move( time );     }   } } <\/code><\/pre>\n<p>  \u041d\u043e \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u0440\u0430\u0431\u043b\u044f \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u0418, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e:  <\/p>\n<pre><code class=\"actionscript\">public function createSpaceship():Spaceship {   var spaceship:Spaceship = new Spaceship();   ...   renderProcess.addItem( spaceship.renderData );   moveProcess.addItem( spaceship.moveData );   ...   return spaceship; } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u043f\u043b\u043e\u0445\u043e. \u041e\u043d \u0434\u0430\u0435\u0442 \u0441\u0432\u043e\u0431\u043e\u0434\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0438 \u0441\u043e\u0447\u0435\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 \u0431\u0435\u0437 \u043a\u0430\u0448\u0438 \u0446\u0435\u043f\u043e\u0447\u0435\u043a \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0441\u0430\u043c\u043e\u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439. \u041d\u043e \u0435\u0441\u0442\u044c \u0438 \u043e\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430.<\/p>\n<h4>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043e\u0431\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439?<\/h4>\n<p>  \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 Renderable \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0442\u0435 \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043e\u043c \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 Movable, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 Move \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441e Render \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438.   <\/p>\n<pre><code class=\"actionscript\">class Renderable implements IRenderable {   public var view:DisplayObject;   public var position:Point;   public var rotation:Number;    public function render():void   {     view.x = position.x;     view.y = position.y;     view.rotation = rotation;   } }  class Moveable implements IMoveable {   public var position:Point;   public var rotation:Number;   public var velocity:Point;   public var angularVelocity:Number;    public function move( time:Number ):void   {     position.x += velocity.x * time;     position.y += velocity.y * time;     rotation += angularVelocity * time;   } }  class Spaceship {   public var renderData:IRenderable;   public var moveData:IMoveable; } <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c\u0438, \u0447\u0442\u043e \u043e\u0431\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u044d\u0442\u0438\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432. \u0412 ActionScript \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435, \u0430 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e.<br \/>  \u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0437\u043e\u0432\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438. \u042d\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043d\u0430\u0434 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438.  <\/p>\n<pre><code class=\"actionscript\">class PositionComponent {   public var x:Number;   public var y:Number;   public var rotation:Number; }  class VelocityComponent {   public var velocityX:Number;   public var velocityY:Number;   public var angularVelocity:Number; }  class DisplayComponent {   public var view:DisplayObject; }  class Renderable implements IRenderable {   public var display:DisplayComponent;   public var position:PositionComponent;    public function render():void   {     display.view.x = position.x;     display.view.y = position.y;     display.view.rotation = position.rotation;   } }  class Moveable implements IMoveable {   public var position:PositionComponent;   public var velocity:VelocityComponent;    public function move( time:Number ):void   {     position.x += velocity.velocityX * time;     position.y += velocity.velocityY * time;     position.rotation += velocity.angularVelocity * time;   } } <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0440\u0430\u0431\u043b\u044f, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b Movable \u0438 Renderable \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 PositionComponent.  <\/p>\n<pre><code class=\"actionscript\">class Spaceship {   public function Spaceship()   {     moveData = new Moveable();     renderData = new Renderable();     moveData.position = new PositionComponent();     moveData.velocity = new VelocityComponent();     renderData.position = moveData.position;     renderData.display = new DisplayComponent();   } } <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b.<\/p>\n<h4>\u0418 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u043e\u0445\u043d\u0443\u0442\u044c.<\/h4>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0447\u0435\u0442\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447. \u0418\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b \u00ab\u043a\u0440\u0443\u0442\u0438\u0442\u00bb \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u043c\u0435\u0442\u043e\u0434 update \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0441 \u043d\u0438\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0438 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441) \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0422\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u044d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u043c\u0435\u044e\u0442 \u043e\u0431\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0438\u0433\u0440\u043e\u0432\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c.<br \/>  \u042d\u0442\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u0433\u0435\u0439\u043c \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u043c\u0435\u043d\u0442\u0435. \u041e\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u041e\u041e\u041f \u0438 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u043e \u0435\u0441\u0442\u044c \u043a\u043e\u0435-\u0447\u0442\u043e \u0435\u0449\u0435 \u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0432\u0435\u0441\u0442\u0438 \u0432\u0430\u0441 \u0441 \u0443\u043c\u0430.<\/p>\n<h4>\u0418\u0437\u0431\u0435\u0433\u0430\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438<\/h4>\n<p>  \u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u0430\u043a <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%98%D0%BD%D0%BA%D0%B0%D0%BF%D1%81%D1%83%D0%BB%D1%8F%D1%86%D0%B8%D1%8F_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5)\">\u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f<\/a> \u0438 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%B0%D0%B7%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BE%D1%82%D0%B2%D0%B5%D1%82%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D0%BE%D1%81%D1%82%D0%B8\">\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/a> \u2014 IRenderable \u0438 IMovable \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043b\u043e\u0433\u0438\u043a\u0443 \u043f\u043e \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044f \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440. \u0418 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%B3%D1%80%D0%B5%D0%B3%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5)\">\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f<\/a> \u2014 \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0440\u0430\u0431\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 IRenderable \u0438 IMovable. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043c\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b \u0447\u0442\u043e, \u0442\u0430\u043c, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u043e, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 data-\u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0438 \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u044e\u0449\u0438\u043c \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0438 \u0441\u0430\u043c\u043e\u0439 \u0441\u0443\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041c\u044b \u0440\u0430\u0437\u043b\u043e\u043c\u0430\u0435\u043c \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043b\u043e\u0433\u0438\u043a\u0438 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0445 Renderable \u0438 Movable. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043c\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u044d\u0442\u043e:  <\/p>\n<pre><code class=\"actionscript\">interface IRenderable {   function render(); }  class Renderable implements IRenderable {   public var display:DisplayComponent;   public var position:PositionComponent;    public function render():void   {     display.view.x = position.x;     display.view.y = position.y;     display.view.rotation = position.rotation;   } }  class RenderProcess implements IProcess {   private var targets:Vector.&lt;IRenderable&gt;;    public function update( time:Number ):void   {     for each( var target:IRenderable in targets )     {       target.render();     }   } } <\/code><\/pre>\n<p>  \u0421\u0442\u0430\u043d\u0435\u0442 \u044d\u0442\u0438\u043c:  <\/p>\n<pre><code class=\"actionscript\">class RenderData {   public var display:DisplayComponent;   public var position:PositionComponent; }  class RenderProcess implements IProcess {   private var targets:Vector.&lt;RenderData&gt;;    public function update( time:Number ):void   {     for each( var target:RenderData in targets )     {       target.display.view.x = target.position.x;       target.display.view.y = target.position.y;       target.display.view.rotation = target.position.rotation;     }   } } <\/code><\/pre>\n<p>  \u0410 \u044d\u0442\u043e:  <\/p>\n<pre><code class=\"actionscript\">interface IMoveable {   function move( time:Number ); }  class Moveable implements IMoveable {   public var position:PositionComponent;   public var velocity:VelocityComponent;    public function move( time:Number ):void   {     position.x += velocity.velocityX * time;     position.y += velocity.velocityY * time;     position.rotation += velocity.angularVelocity * time;   } }  class MoveProcess implements IProcess {   private var targets:Vector.&lt;IMoveable&gt;;    public function move( time:Number ):void   {     for each( var target:Moveable in targets )     {       target.move( time );     }   } } <\/code><\/pre>\n<p>  \u0421\u0442\u0430\u043d\u0435\u0442 \u044d\u0442\u0438\u043c:  <\/p>\n<pre><code class=\"actionscript\">class MoveData {   public var position:PositionComponent;   public var velocity:VelocityComponent; }  class MoveProcess implements IProcess {   private var targets:Vector.&lt;MoveData&gt;;    public function move( time:Number ):void   {     for each( var target:MoveData in targets )     {       target.position.x += target.velocity.velocityX * time;       target.position.y += target.velocity.velocityY * time;       target.position.rotation += target.velocity.angularVelocity * time;     }   } } <\/code><\/pre>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0437\u0430\u0447\u0435\u043c \u043c\u044b \u044d\u0442\u043e \u043d\u0430\u0442\u0432\u043e\u0440\u0438\u043b\u0438, \u043d\u043e \u0434\u043e\u0432\u0435\u0440\u044c\u0442\u0435\u0441\u044c \u043c\u043d\u0435. \u041c\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0435\u043b\u0430\u044e\u0442 \u043d\u0435\u0447\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u2014 \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 IRenderable \u0438\u043b\u0438 IMovable, \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u0443 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0430\u043c.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438, \u0441 \u0442\u0435\u0445 \u043f\u043e\u0440 \u043a\u0430\u043a \u043a\u043e\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0432 RenderProcess. \u041d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u0443\u0442\u044c. \u041c\u044b \u043c\u043e\u0436\u0435\u043c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, RenderMovieClip \u0438 RenderBitmap \u0438 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u043c \u0432 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u0422\u043e, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u2014 \u044d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0441 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439. \u0420\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<h4>\u041d\u0443\u0436\u043d\u044b \u043b\u0438 \u043d\u0430\u043c \u043a\u043b\u0430\u0441\u0441\u044b-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f?<\/h4>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0448\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c  <\/p>\n<pre><code class=\"actionscript\">class Spaceship {   public var moveData:MoveData;   public var renderData:RenderData; } <\/code><\/pre>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430  <\/p>\n<pre><code class=\"actionscript\">class MoveData {   public var position:PositionComponent;   public var velocity:VelocityComponent; }  class RenderData {   public var display:DisplayComponent;   public var position:PositionComponent; } <\/code><\/pre>\n<p>  \u042d\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:  <\/p>\n<pre><code class=\"actionscript\">class PositionComponent {   public var x:Number;   public var y:Number;   public var rotation:Number; }  class VelocityComponent {   public var velocityX:Number;   public var velocityY:Number;   public var angularVelocity:Number; }  class DisplayComponent {   public var view:DisplayObject; } <\/code><\/pre>\n<p>  \u0418 \u044d\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0434\u0432\u0443\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445:  <\/p>\n<pre><code class=\"actionscript\">class MoveProcess implements IProcess {   private var targets:Vector.&lt;MoveData&gt;;    public function move( time:Number ):void   {     for each( var target:MoveData in targets )     {       target.position.x += target.velocity.velocityX * time;       target.position.y += target.velocity.velocityY * time;       target.position.rotation += target.velocity.angularVelocity * time;     }   } }  class RenderProcess implements IProcess {   private var targets:Vector.&lt;RenderData&gt;;    public function update( time:Number ):void   {     for each( var target:RenderData in targets )     {       target.display.view.x = target.position.x;       target.display.view.y = target.position.y;       target.display.view.rotation = target.position.rotation;     }   } } <\/code><\/pre>\n<p>  \u041d\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. \u041a\u043b\u0430\u0441\u0441\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u041c\u044b \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043c \u043a\u043e\u0434 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043a\u043b\u0430\u0441\u0441 Spaceship \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b \u0441\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.  <\/p>\n<pre><code class=\"actionscript\">class Spaceship {   public var position:PositionComponent;   public var velocity:VelocityComponent;   public var display:DisplayComponent; }  class PositionComponent {   public var x:Number;   public var y:Number;   public var rotation:Number; }  class VelocityComponent {   public var velocityX:Number;   public var velocityY:Number;   public var angularVelocity:Number; }  class DisplayComponent {   public var view:DisplayObject; } <\/code><\/pre>\n<p>  \u0418\u0437\u0431\u0430\u0432\u043b\u044f\u044f\u0441\u044c \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0438\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u0440\u0430\u0431\u043b\u044c, \u043c\u044b \u0443\u0431\u0440\u0430\u043b\u0438 \u0432\u0441\u044f\u043a\u0443\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e \u0432\u043b\u0438\u044f\u0442\u044c. \u041a\u043e\u0440\u0430\u0431\u043b\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u041b\u044e\u0431\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<h4>\u0421\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0443\u0437\u043b\u044b.<\/h4>\n<p>  \u041d\u0435\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u044f\u0434\u0440\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Entity System (\u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043c\u0438\u043d\u0443\u0442\u0443) \u0431\u0443\u0434\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0430\u043a, \u043a\u0430\u043a \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0412 \u044d\u0442\u043e\u043c \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u043a\u043b\u0430\u0441\u0441\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u043d\u0438 \u0447\u0435\u043c \u0438\u043d\u044b\u043c, \u043a\u0430\u043a \u0443\u0437\u043b\u0430\u043c\u0438, \u0438\u043b\u0438 \u043b\u0438\u0441\u0442\u044c\u044f\u043c\u0438, \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u0445 (\u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445, \u0441\u0432\u044f\u0437\u043d\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u0430\u0445 \u0438\u043b\u0438 \u043b\u044e\u0431\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b. \u0422\u0430\u043a \u0447\u0442\u043e \u0434\u043b\u044f \u044f\u0441\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u0443\u0435\u043c \u0438\u0445 \u0432 \u0443\u0437\u043b\u044b.  <\/p>\n<pre><code class=\"actionscript\">class MoveNode {   public var position:PositionComponent;   public var velocity:VelocityComponent; }  class RenderNode {   public var display:DisplayComponent;   public var position:PositionComponent; } <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u043d\u043e, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u044b \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u0443\u0435\u043c \u0438\u0445 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.  <\/p>\n<pre><code class=\"actionscript\">class MoveSystem implements ISystem {   private var targets:Vector.&lt;MoveNode&gt;;    public function update( time:Number ):void   {     for each( var target:MoveNode in targets )     {       target.position.x += target.velocity.velocityX * time;       target.position.y += target.velocity.velocityY * time;       target.position.rotation += target.velocity.angularVelocity * time;     }   } }  class RenderSystem implements ISystem {   private var targets:Vector.&lt;RenderNode&gt;;    public function update( time:Number ):void   {     for each( var target:RenderNode in targets )     {       target.display.view.x = target.position.x;       target.display.view.y = target.position.y;       target.display.view.rotation = target.position.rotation;     }   } }  interface ISystem {   function update( time:Number ):void; } <\/code><\/pre>\n<h4>\u0418 \u0447\u0435\u043c \u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c?<\/h4>\n<p>  \u041e\u0434\u043d\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 Spaceship \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e Entity \u0438 \u0434\u0430\u0434\u0438\u043c \u0435\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0438\u0445 \u0442\u0438\u043f \u043a\u043b\u0430\u0441\u0441\u0430 (\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043a\u0430\u0436\u0438\u0442\u0435 \u043c\u043d\u0435 \u044d\u0442\u043e \u043d\u0430 \u043f\u043b\u044e\u0441\u0430\u0445 \u2014 \u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430).  <\/p>\n<pre><code class=\"actionscript\">class Entity {   private var components : Dictionary;      public function add( component:Object ):void   {     var componentClass : Class = component.constructor;     components[ componentClass ] = component'   }      public function remove( componentClass:Class ):void   {     delete components[ componentClass ];   }      public function get( componentClass:Class ):Object   {     return components[ componentClass ];   } } <\/code><\/pre>\n<p>  \u0418 \u0432\u043e\u0442 \u0442\u0430\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u0440\u0430\u0431\u043b\u0438:  <\/p>\n<pre><code class=\"actionscript\">public function createSpaceship():void {   var spaceship:Entity = new Entity();   var position:PositionComponent = new PositionComponent();   position.x = Stage.stageWidth \/ 2;   position.y = Stage.stageHeight \/ 2;   position.rotation = 0;   spaceship.add( position );   var display:DisplayComponent = new DisplayComponent();   display.view = new SpaceshipImage();   spaceship.add( display );   engine.add( spaceship ); } <\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u044f\u0434\u0440\u0430 \u0434\u0432\u0438\u0436\u043a\u0430<\/h4>\n<p>  \u041c\u044b \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 \u0441\u0438\u0441\u0442\u0435\u043c, \u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u043a\u0430\u043a \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432:  <\/p>\n<pre><code class=\"actionscript\">class SystemManager {   private var systems:PrioritisedList;    public function addSystem( system:ISystem, priority:int ):void   {     systems.add( system, priority );     system.start();   }    public function update( time:Number ):void   {     for each( var system:ISystem in systemes )     {       system.update( time );     }   }    public function removeSystem( system:ISystem ):void   {     system.end();     systems.remove( system );   } } <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d \u0438 \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u0435\u0440\u0434\u0446\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430. \u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u0437\u043b\u044b \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<p>  \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u044e\u0442 \u0434\u0435\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0443\u0437\u043b\u0430\u043c\u0438. \u0418, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u043d\u0430\u0448 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c (\u0437\u0430\u0441\u0442\u0440\u0435\u043b\u0438\u0442\u0435 \u043c\u0435\u043d\u044f, \u043d\u043e \u044f \u043d\u0435 \u0437\u043d\u0430\u044e, \u043a\u0430\u043a \u043b\u0443\u0447\u0448\u0435 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u2014 \u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430), \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043a\u043e\u0434\u0438\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u043f\u0440\u0438 \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0443\u0437\u043b\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e\u0442 \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430 \u0437\u043d\u0430\u0435\u0442 \u0438 \u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u0445, \u0438 \u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u043f\u0440\u044f\u043c\u043e \u0432 \u0446\u0435\u043d\u0442\u0440 \u0438\u0433\u0440\u044b. \u042f \u043d\u0430\u0437\u044b\u0432\u0430\u044e \u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0434\u0432\u0438\u0436\u043a\u0430 \u0438 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<p>  \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u0432\u0438\u0436\u043a\u0430 \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u043c \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0414\u0432\u0438\u0436\u043e\u043a \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0443\u0437\u043b\u044b \u043f\u043e \u043c\u0435\u0440\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u044d\u0442\u0438 \u0443\u0437\u043b\u044b \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u044b. \u0414\u0432\u0438\u0436\u043e\u043a \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u0441\u0438\u0441\u0442\u0435\u043c \u043a \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c \u0443\u0437\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c \u043d\u0443\u0436\u043d\u044b.  <\/p>\n<pre><code class=\"actionscript\">public class Engine {   private var entities:EntityList;   private var systems:SystemList;   private var nodeLists:Dictionary;    public function addEntity( entity:Entity ):void   {     entities.add( entity );     \/\/ \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u0437\u043b\u043e\u0432 \u0438\u0437 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0445 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u0437\u043b\u043e\u0432     \/\/ \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043a      \/\/ \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0443\u0437\u043b\u0430\u0445   }    public function removeEntity( entity:Entity ):void   {     \/\/ \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438     \/\/ \u0438 \u0438\u0445 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0443\u0437\u043b\u043e\u0432     entities.remove( entity );   }    public function addSystem( system:System, priority:int ):void   {     systems.add( system, priority );     system.start();   }    public function removeSystem( system:System ):void   {     system.end();     systems.remove( system );   }    public function getNodeList( nodeClass:Class ):NodeList   {     var nodes:NodeList = new NodeList();     nodeLists[ nodeClass ] = nodes;     \/\/ create the nodes from the current set of entities     \/\/ and populate the node list     return nodes;   }    public function update( time:Number ):void   {     for each( var system:ISystem in systemes )     {       system.update( time );     }   } } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6eb\/711\/c16\/6eb711c160d29e2fc664b508ccfd4787.png\" alt=\"image\"\/><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0434\u0435\u043b\u0435, \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043c\u043e\u0439 <a href=\"http:\/\/www.ashframework.org\/\">Ash Entity System Framework<\/a> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0433\u0440\u044b <a href=\"https:\/\/github.com\/richardlord\/Ash\/tree\/master\/examples\/no-dependencies\">Asteroids<\/a>.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041a\u0440\u0430\u0442\u043a\u043e \u0433\u043e\u0432\u043e\u0440\u044f, Entity Systems \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0438 \u0438\u0437-\u0437\u0430 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b. \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438\u0433\u0440\u044b, \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u0432 \u0438\u0433\u0440\u0435. \u0421\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440 \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b. \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0438\u0437 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043d\u0438\u0445 (\u0441\u0438\u0441\u0442\u0435\u043c) \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u0414\u0432\u0438\u0436\u043e\u043a \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0442\u0435\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442. \u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u044f\u0441\u043d\u043e\u0441\u0442\u0438, \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0443\u0437\u043b\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u044b, \u0433\u0434\u0435 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u043a \u043e\u0434\u043d\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  Entity System Framework \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043a\u0430\u0440\u043a\u0430\u0441 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c. \u0412\u044b \u0441\u0442\u0440\u043e\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u0438\u0433\u0440\u0443, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430:<\/b><\/p>\n<div class=\"spoiler_text\">\u041a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e Entity Component System \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u043d\u0430 C++? \u0411\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u0411\u0435\u0433\u043b\u044b\u0439 \u0433\u0443\u0433\u043b\u0435\u0436 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u0438\u0448\u044c Artemis Entity System Framework, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0431\u0443\u0434\u0443 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e.<br \/>  \u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u043e \u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c\u0438:<br \/>  \u041e\u0447\u0435\u043f\u044f\u0442\u043a\u0438, \u0445\u044a\u044e\u0441\u0438\u0437\u043c\u044b \u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0432 \u041b\u0421 \ud83d\ude42  <\/div>\n<\/div>\n<p>  <a href=\"http:\/\/www.richardlord.net\/blog\/what-is-an-entity-framework\">\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b<\/a> \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/197920\/\"> http:\/\/habrahabr.ru\/post\/197920\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u0433\u0440\u044b \u0441 \u043d\u0443\u043b\u044f, \u043d\u043e \u043c\u0430\u043b\u043e \u0441\u0442\u0430\u0442\u0435\u0439, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0441\u0432\u043e\u044f \u043b\u044e\u0431\u0438\u043c\u0430\u044f \u043f\u043e\u0434\u0435\u043b\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0430\u0441\u044c \u0432\u043e \u0424\u0440\u0430\u043d\u043a\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430 \u0438 \u0434\u043e\u0448\u043b\u0430 \u0434\u043e \u0432\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u0410\u0432\u0442\u043e\u0440 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u043e\u0434 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430 \u043e\u0442 \u043a\u0443\u0447\u0438 \u0445\u043b\u0430\u043c\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043a \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0439, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0439 Entity Component System. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0447\u0442\u0438 \u0432\u0435\u0441\u044c \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u2014 \u043d\u043e \u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u0435\u0433\u043e \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441 \u043d\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u043e\u0441\u0438\u0442 \u0430\u0432\u0442\u043e\u0440 \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432, \u0432\u0440\u043e\u0434\u0435 \u043c\u0435\u043d\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0447\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u00ab\u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u044b\u0445\u00bb \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0437\u043d\u0430\u044e\u0442, \u043a\u0430\u043a \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0445 \u043a\u043e\u0434\u0435.  <\/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-197920","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/197920","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=197920"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/197920\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=197920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=197920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=197920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}