{"id":277083,"date":"2016-03-28T12:28:02","date_gmt":"2016-03-28T08:28:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277083"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277083","title":{"rendered":"\u041d\u0430\u0443\u0447\u0438\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0432\u0430\u0442\u044c"},"content":{"rendered":"<p>       \u0417\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f. \u042f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0438 \u043b\u044e\u0434\u0438, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0438\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u044f\u0442\u0441\u044f, \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u0433\u0440. \u0418, \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e, \u044f \u0441\u0430\u043c \u043f\u043e\u043d\u044f\u043b \u0432\u0441\u0435 \u043d\u0435 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043d\u0435\u0434\u0435\u043b\u044e. \u041d\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u044f \u0443\u0436\u0435 \u0437\u0430\u0431\u044b\u043b \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0433\u0440\u044b \u0438\u043d\u0430\u0447\u0435. \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439, \u043d\u043e \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043c\u0430\u043b\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u0438 \u0437\u0430\u0447\u0435\u043c \u0438 \u0441 \u0447\u0435\u043c \u044d\u0442\u043e \u0435\u0441\u0442\u044c.<\/p>\n<p>  \u041a\u0430\u043a \u043a\u043e\u0435-\u043a\u0442\u043e \u0443\u0436\u0435 \u043c\u043e\u0433 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u044f \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u201cCommand\u201d \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0433\u0440 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0432\u0438\u0436\u043a\u0430 Unity 3D. \u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435. \u041a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u043c, \u043d\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0430\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u0440\u043e\u043b\u043e\u0433<\/h4>\n<p>  \u0412\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Actor-\u044b \u0432 Unity? \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u0441\u0443\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435: \u0432 \u0432\u0430\u0448\u0435\u0439 \u0438\u0433\u0440\u0435 \u0435\u0441\u0442\u044c \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u043f\u0440\u044b\u0433\u0430\u0442\u044c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u043f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u0438\u0437\u043c: \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u044e\u043d\u0438\u0442\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 Jump \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044e\u043d\u0438\u0442\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class UnitController : MonoBehaviour  {     public Rigidbody AttachedRigidbody;     \/\/...     public virtual void Jump()     { \trigidbody.velocity = new Vector3 (0, 10, 0);     }     \/\/... } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">public class RabitUnitController : UnitController  {     \/\/...     public override void Jump ()     {         \/\/very high jump     }     \/\/... } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u044e\u043d\u0438\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u043f\u0440\u044b\u0433\u0430\u043b\u0438, \u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u044b\u0433\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e, \u0442\u043e \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u0447\u0443\u0442\u044c \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0434\u0430 \u0432\u043e \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b (\u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0436\u0430\u0441\u0430\u044e\u0449\u0435).<\/p>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Actor-o\u0432 \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0430\u0447\u0435. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434^ \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u044e\u043d\u0438\u0442\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 Jump \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u044f\u0434 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 UnitJumper \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0446\u0435\u043f\u043b\u044f\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u044e\u043d\u0438\u0442\u0430. \u0418 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u044b\u0436\u043a\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 Jump \u043d\u0430 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 Actor-\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class UnitJumper : MonoBehaviour  {     public virtual void Jump(Rigidbody rigidbody)     {} }  public class RegularJumper : UnitJumper  {     public override void Jump (Rigidbody rigidbody)     {         base.Jump (rigidbody);         rigidbody.velocity = new Vector3 (0, 10, 0);     } }  public class MajesticAFJumper : UnitJumper  {     public override void Jump (Rigidbody rigidbody)     {         base.Jump (rigidbody);         rigidbody.velocity = new Vector3 (0, 15, 10);         \/*          * some magic here          *\/     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0410 \u0442\u0430\u043a\u0438\u043c \u0441\u0442\u0430\u043b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class UnitController : MonoBehaviour  {     [SerializeField]     private UnitJumper _unitJumper;     public Rigidbody AttachedRigidbody;          \/\/...     public virtual void Jump()     {         if (_unitJumper != null)             _unitJumper.Jump (AttachedRigidbody);         else             Debug.Log(&quot;UnitJumper Component is missing&quot;);     }     \/\/... } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043b\u043e \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u041c\u0435\u043d\u044c\u0448\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0435\u0439, \u043a\u043e\u0434 \u043f\u0440\u044b\u0436\u043a\u0430 \u0432\u044b\u043d\u0435\u0441\u0435\u043d \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u043b\u0430\u0441\u0441, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0435\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c. \u041a\u0430\u0436\u0434\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u044b\u0436\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e-\u0443\u0433\u043e\u0434\u043d\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0442\u043e\u0447\u043d\u043e \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u044f \u0438\u0445 \u0432\u044b \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0435, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0431\u0435\u0433. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u0440\u044b\u0436\u043a\u0430 \u0434\u043b\u044f \u044e\u043d\u0438\u0442\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u0430\u043c\u0430 \u0441\u0440\u0435\u0434\u0430 \u043d\u0430\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441 \u043d\u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435, \u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 [RequireComponent()] \u0441 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0435\u0449\u0435 \u043c\u0435\u043d\u044c\u0448\u0435. \u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0437\u0430\u0447\u0435\u043c \u044f \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0438 \u0432 \u0447\u0435\u043c \u0441\u0432\u044f\u0437\u044c. \u0410 \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0443 Command.<\/p>\n<h4>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434<\/h4>\n<p>  \u041c\u044b \u0443\u0436\u0435 \u043e\u0442\u043e\u0448\u043b\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043f\u0440\u044b\u0436\u043a\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441, \u043d\u043e \u043a\u0430\u043a \u0431\u044b\u0442\u044c \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u044e\u043d\u0438\u0442\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u043f\u0440\u044b\u0433\u0430\u043b\u0438, \u043d\u043e \u0438 \u0447\u0442\u043e\u0431\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0433\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u044b\u0436\u043a\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432 (\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043b\u044c\u0442\u043e, \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e \u0441\u0442\u0435\u043d\u0435)? \u0412\u043e\u0442 \u0437\u0434\u0435\u0441\u044c-\u0442\u043e \u043d\u0430\u043c \u0438 \u043d\u0443\u0436\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430.<\/p>\n<p>  \u0421\u0443\u0442\u044c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0442\u0430 \u0436\u0435 \u2014 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u0422\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0430 \u044e\u043d\u0438\u0442\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0438 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043a\u043e\u0433\u0434\u0430-\u0443\u0433\u043e\u0434\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u044e\u043d\u0438\u0442\u0430 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Actor-\u0430\u043c\u0438. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class Command : MonoBehaviour  {     public static T ExecuteOn&lt;T&gt;(GameObject target)         where T : Command     {         return target.AddComponent &lt;T&gt;();     }      private void Start()     {         OnStart ();     }      protected virtual void OnStart()     {} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u044b\u0448\u0435 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043b\u0443\u0436\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u043c\u0435\u0442\u043e\u0434 OnStart() \u043f\u043e\u043a\u0430 (\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430) \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f intellisense.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u044b\u0436\u043e\u043a.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u044b\u0436\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class RegularJumpCommand : Command {     protected override void OnStart ()     {         base.OnStart ();         gameObject.GetComponent &lt;Rigidbody&gt;().velocity = new Vector3(0, 10, 0);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044e\u043d\u0438\u0442\u0430 \u043f\u0440\u044b\u0433\u043d\u0443\u0442\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u044b\u0437\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class SomeController : MonoBehaviour  {     \/\/don't forget to set this in editor     public UnitController _targetUnit;      private void Start()     {         if (_targetUnit != null)         {             Command.ExecuteOn&lt;RegularJumpCommand&gt; (_targetUnit.gameObject);         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430, \u2014 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f velocity \u0443 \u043d\u0430\u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u044b\u0436\u043e\u043a \u0447\u0443\u0442\u044c \u0432\u044b\u0448\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0420\u0430\u043d\u044c\u0448\u0435 \u043c\u044b \u0431\u044b \u044d\u0442\u043e \u0440\u0435\u0448\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u044b\u0436\u043a\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438 \u0437\u0434\u0435\u0441\u044c \u0442\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0435\u043c. \u041f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c-\u043a\u0430 \u043d\u0430\u0448\u0443 \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class Command : MonoBehaviour  {     private object[] _args;      public static T ExecuteOn&lt;T&gt;(GameObject target, object[] args = null)         where T : Command     {         T result = target.AddComponent &lt;T&gt;();         result._args = args;         return result;     }      private void Start()     {             OnStart (_args);     }      protected virtual void OnStart(object[] args)     {} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u044b\u0436\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b (\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c). \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Start() \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0443\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0432 \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 OnStart(object[] args).<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u044b\u0436\u043a\u0430 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432 \u043d\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u0432\u043d\u0435:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class RegularJumpCommand : Command {     protected override void OnStart (object[] args)     {         base.OnStart (args);         gameObject.GetComponent &lt;Rigidbody&gt; ().velocity = (Vector3)args [0];     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u044b\u0437\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class SomeController : MonoBehaviour  {     \/\/ don't forget to set this in editor     public UnitController _targetUnit;      private void Start()     {         if (_targetUnit != null)         {             Command.ExecuteOn&lt;RegularJumpCommand&gt; (_targetUnit.gameObject,                                                    new object[]{new Vector3(0, 10, 0)});         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u0442\u0430\u043b\u0438 \u0433\u0438\u0431\u043a\u0438\u043c\u0438 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u0430\u043b\u044c\u0442\u043e. \u041d\u043e \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u043c OnStart(object[] args).<\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443 \u043d\u0430\u0441 \u0435\u0449\u0435 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u2014 \u044d\u0442\u043e \u0442\u043e \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u043f\u0440\u044b\u0436\u043a\u0435 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 GetComponent(). \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0435\u0449\u0435 \u0441 Actor-\u043e\u0432 \u0443 \u043d\u0430\u0441 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0441\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0431\u0443\u0434\u0435\u043c \u0443 \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043c\u044b \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0444\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class CommandWithType&lt;T&gt; : Command     where T : MonoBehaviour {     protected T Controller     {         get;         private set;     }      protected override void OnStart (object[] args)     {         base.OnStart (args);         Controller = args [0] as T;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u0441\u0430\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u043c\u0435\u0440 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0442\u043e\u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435. \u0417\u0430\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043d\u0435 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u044f \u043a GetComponent(). \u0418 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c base.OnStart (args), \u0438\u043d\u0430\u0447\u0435 \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class RegularJumpCommand : CommandWithType&lt;UnitController&gt; {     protected override void OnStart (object[] args)     {         base.OnStart (args);         Controller.AttachedRigidbody.velocity = (Vector3)args [1];     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u044b\u0437\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0442\u043e\u0436\u0435 \u0441\u0442\u0430\u043b \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u0434\u0440\u0443\u0433\u0438\u043c:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class SomeController : MonoBehaviour  {     \/\/don't forget to set this in editor     public UnitController _targetUnit;      private void Start()     {         if (_targetUnit != null)         {             Command.ExecuteOn&lt;RegularJumpCommand&gt; (_targetUnit.gameObject,                                                    new object[]{_targetUnit ,new Vector3(0, 10, 0)});         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0441\u0442\u0430\u043b\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u0445\u043e\u0440\u043e\u0448\u043e: \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 (\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u0443, \u0437\u0430\u043f\u043e\u0441\u0442\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0433\u0434\u0435-\u0442\u043e) \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0443\u0436\u0435\u043d \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 (\u0438\u0434\u0442\u0438, \u0431\u0435\u0436\u0430\u0442\u044c, \u043b\u0435\u0442\u0435\u0442\u044c). \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u044b \u043f\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0441\u0435\u043c\u044c\u0435\u0439 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u043c\u0435\u0439, \u0447\u0442\u043e \u0432\u043d\u043e\u0441\u0438\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c. \u0410 \u0442\u0430\u043a \u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0449\u0435 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u043b\u044e\u0441\u044b Actor-\u0432. \u0410 \u0435\u0449\u0435 \u0432\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0435. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u0436\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0438\u0433\u0440\u0430\u043b\u0438: \u0441\u0442\u0430\u043b\u0438 \u0442\u0430\u043a\u0438\u043c\u0438-\u0436\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u043c\u0435\u0441\u0442\u0438\u043b\u0438\u0449\u0430\u043c\u0438 \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b (\u043f\u043e\u0437\u0436\u0435 \u043c\u044b, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0434\u0430\u0434\u0438\u043c \u0438\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u0441\u0430). \u041d\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u043e \u0438 \u0441 \u0442\u0430\u043a\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u043c\u044b \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u043b\u0435\u043a\u043e \u0443\u0435\u0434\u0435\u043c.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u043a\u0430 \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u043f\u0440\u044b\u0436\u043a\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043c\u044b \u0435\u0449\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438. \u0414\u043e\u0432\u0435\u0434\u0435\u043c \u0434\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0442 \u043d\u0435\u0443\u043a\u043b\u044e\u0436\u0438\u0439, \u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430: \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u0441\u044f\u0442\u0438 \u043f\u0440\u044b\u0436\u043a\u043e\u0432 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0441\u0435\u0442\u044c \u0434\u0435\u0441\u044f\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434. \u0412\u0442\u043e\u0440\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u2014 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e velocity \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0440\u0442\u0435 \u0438 \u044d\u0442\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430.<\/p>\n<p>  \u0421\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043f\u043e\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c, \u043f\u043e\u0434\u0438 \u0432\u0442\u043e\u0440\u043e\u0435 \u0438 \u0441\u0430\u043c\u043e \u0440\u0435\u0448\u0438\u0442\u0441\u044f, \u0442\u0430\u043a \u0432\u0435\u0434\u044c \u0431\u044b\u0432\u0430\u0435\u0442. \u0421\u0430\u043c\u043e\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0441\u0430\u043c\u0430 \u0443\u0431\u0438\u0440\u0430\u043b\u0430, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043f\u0430\u043a\u043e\u0441\u0442\u0438\u043b\u0430. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0434\u0432\u0430 \u0444\u043b\u0430\u0433\u0430, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430 \u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0432\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (\u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0436\u0435). \u0418 \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442 (\u043d\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0435\u0435 \u0444\u043e\u0440\u043c\u0430).<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0423\u0431\u043e\u0440\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430 \u0441\u043e\u0431\u043e\u0439<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class Command : MonoBehaviour  {     private object[] _args;      private bool _started = false;     private bool _isReleased = false;      public bool IsRunning     {         get{ return _started && !_isReleased;}     }      public static T ExecuteOn&lt;T&gt;(GameObject target, object[] args = null)         where T : Command     {         T result = target.AddComponent &lt;T&gt;();         result._args = args;         return result;     }      private void Start()     {         _started = true;         OnStart (_args);     }      protected virtual void OnStart(object[] args)     {}      private void OnDestroy()     {         if (!_isReleased)             OnReleaseResources ();     }      protected virtual void OnReleaseResources()     {         _isReleased = true;     }      protected void FinishCommand()     {         OnReleaseResources ();         Destroy (this, 1f);     }      protected virtual void OnFinishCommand(){} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u043c\u0430\u043d\u0434\u0430, \u043a\u0430\u043a \u043f\u043e\u0440\u044f\u0434\u043e\u0447\u043d\u044b\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0438\u043d \u0438 \u0447\u043b\u0435\u043d \u0441\u043e\u0446\u0438\u0443\u043c\u0430 \u0441\u0430\u043c\u043e\u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u0441\u044f, \u0441\u0442\u043e\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 FinishCommand() \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439. Destroy() \u0443 \u043d\u0430\u0441 \u0441\u043b\u0435\u0433\u043a\u0430 \u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435, \u043a\u043e\u043c\u0443 \u043d\u0430\u0434\u043e, \u043c\u043e\u0433\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u0447\u0435\u0437\u043d\u043e\u0432\u0435\u043d\u0438\u0435\u043c (\u0432\u0437\u044f\u0442\u044c \u0438\u0437 \u043d\u0435\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0437\u0436\u0435), \u0430 \u0444\u043b\u0430\u0433 IsRunning \u043d\u0443\u0436\u0435\u043d \u0441\u0430\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043d\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0440\u0430\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043d\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u043b\u0430 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f. \u0412\u0441\u0435 \u043e\u0442\u043f\u0438\u0441\u043a\u0438 \u043e\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 OnReleaseResources() \u0438\u043b\u0438 \u0432 OnFinishCommand(). \u0418 \u043d\u0435 \u043d\u0430\u0434\u043e \u0431\u043e\u044f\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u0448\u044c On<b>Destory<\/b>() \u0438 \u0431\u0443\u0434\u0435\u0448\u044c \u0434\u043e\u043b\u0433\u043e \u043c\u0443\u0447\u0430\u0442\u0441\u044f (\u043a\u0430\u043a \u044f \u043a\u043e\u0433\u0434\u0430-\u0442\u043e).<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441 \u044d\u0442\u0438\u043c \u0432\u0441\u0435\u043c \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0448\u0438\u0442\u044c \u0438 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 velocity \u0432 FixedUpdate<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class RegularJumpCommand : CommandWithType&lt;UnitController&gt; {     private Vector3 _velocity;     protected override void OnStart (object[] args)     {         base.OnStart (args);         _velocity = (Vector3)args [1];     }      private void FixedUpdate()     {         if (!IsRunning)             return;                  Controller.AttachedRigidbody.velocity = _velocity;         FinishCommand ();     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 velocity \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u043e\u0441\u043b\u0435 Start-a \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0447\u0443\u0434\u0435\u0441\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u0432\u0440\u043e\u0434\u0435 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u043b\u0438\u043d\u0430\u043d\u0438\u044f, \u0431\u0435\u0433\u0430, \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u044b\u0436\u043a\u043e\u0432 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432.<\/p>\n<h4>\u041d\u043e \u043a\u0430\u043a \u0436\u0435?!<\/h4>\n<p>  \u042d\u0442\u0438\u043c \u0435\u0449\u0435 \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u044e\u0434\u0443, \u0433\u0434\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u043d\u0430\u0434\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043d\u0435 \u0434\u0430\u0442\u044c \u0434\u0435\u0442\u044f\u043c \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u043f\u043b\u044e\u0448\u043a\u0438 \u0437\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0435\u043d\u044c\u0433\u0438) \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043a\u0430\u043a \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0431\u0435\u0433\u0430 \u0437\u0438\u0433\u0437\u0430\u0433\u0430\u043c\u0438. \u0421\u043f\u043b\u043e\u0448\u044c \u0438 \u0440\u044f\u0434\u043e\u043c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u0437\u043d\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c \u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430, \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043b\u0438 \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430\u0441\u044c \u0438 \u0435\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0437 \u043d\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0438 \u0434\u0435\u043b\u0430\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f). \u041a\u043e\u0440\u043e\u0447\u0435: \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 callback-\u043e\u0432. \u041b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u043d\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 Unity UI \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u043d\u0438\u0445, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u043a\u043e\u0434\u0430 (\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u2014 \u0433\u0440\u0435\u0448\u043d\u043e, \u043d\u0435 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0442\u0430\u043a).<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445, \u0434\u0430\u0436\u0435 \u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e, \u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0441\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043e\u0442\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c-\u0442\u043e \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u0410 \u0431\u043e\u043b\u044c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435 \u0441\u043f\u0438\u043d\u044b, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0431\u044b\u043b \u043e\u0442\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f, \u043c\u0430\u043b\u043e \u043a\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0435\u0441\u0442\u0438 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0432 \u043f\u043e\u043b\u043d\u0443\u044e \u0441\u0438\u043b\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0430\u0432\u043e\u043a. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u0434\u0435\u043b\u0430\u0442\u044c callback-\u0438 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0438 \u043d\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 \u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f \u0438 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043e\u0442\u043f\u0438\u0441\u043a\u043e\u0439. \u0422\u0430\u043a\u0436\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 callback-\u0430 \u0441\u0430\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0435\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u043b\u0435\u043c \u0432 \u043a\u043b\u0430\u0441\u0441\u0435. \u0410 \u0435\u0449\u0435 \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437\u0432\u043d\u0435.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435: \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0434\u043b\u044f \u0442\u0435\u0445 \u0441\u0430\u043c\u044b\u0445 callback-\u043e\u0432. \u0421\u043a\u0430\u0437\u0430\u043d\u043e \u2014 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u2014 \u043d\u0430\u0440\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u0412\u044b\u0448\u043b\u043e \u0443 \u043d\u0430\u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Callback<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">    public class Callback&lt;T&gt;          where T : Command     {         public readonly Action&lt;T&gt; Succeed;         public readonly Action&lt;T&gt; Fault;          public Callback (Action&lt;T&gt; succeed)         {             this.Succeed = succeed;         }          public Callback (Action&lt;T&gt; succeed, Action&lt;T&gt; fault)         {             this.Succeed = succeed;             this.Fault = fault;         }     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u043e\u0441\u0442\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e. \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435 \u0447\u0442\u043e \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0435\u0441\u043b\u0438 callback \u043e\u0434\u0438\u043d, \u0442\u043e \u043c\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0442\u043e \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0432\u044b\u0437\u043e\u0432\u0435\u0442\u0441\u044f \u043e\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 callback-\u043e\u0432, \u0432\u0435\u0434\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043b\u043e. \u0418 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u043e\u0442 \u0447\u0442\u043e:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">CallbackToken<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">    public class CallbackToken &lt;T&gt;         where T : Command     {         private List&lt;Callback&lt;T&gt;&gt; _callbacks;          private T _command;          public CallbackToken (T _command)         {             this._command = _command;             _callbacks = new List&lt;Callback&lt;T&gt;&gt;();         }          public void AddCallback(Callback&lt;T&gt; callback)         {             _callbacks.Add (callback);         }          public void RemoveCallback(Callback&lt;T&gt; callback)         {             _callbacks.Remove (callback);         }          public void FireSucceed()         {             foreach (Callback&lt;T&gt; calback in _callbacks)             {                 calback.Succeed(_command);             }         }          public void FireFault()         {             foreach (Callback&lt;T&gt; callback in _callbacks)             {                 if (callback.Fault != null)                 {                     callback.Fault (_command);                 }             }         }     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c CallbackToken \u0432 \u043d\u0430\u0448\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u043d\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438 \u0438\u0437\u0432\u043d\u0435. \u0418 \u0441\u0440\u0430\u0437\u0443 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441 Callback-\u043e\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class Command : MonoBehaviour  {     private object[] _args;      private bool _started = false;     private bool _isReleased = false;      public CallbackToken&lt;Command&gt; CallbackToken     {         get;         private set;     }      public Command ()     {         CallbackToken = new CallbackToken&lt;Command&gt; (this);     }      public bool IsRunning     {         get{ return _started && !_isReleased;}     }      public static T ExecuteOn&lt;T&gt;(GameObject target, object[] args = null)         where T : Command     {         T result = target.AddComponent &lt;T&gt;();         result._args = args;         return result;     }      private void Start()     {         _started = true;         OnStart (_args);     }      protected virtual void OnStart(object[] args)     {}      private void OnDestroy()     {         if (!_isReleased)             OnReleaseResources ();     }      protected virtual void OnReleaseResources()     {         _isReleased = true;     }      protected void FinishCommand(bool result = true)     {         OnReleaseResources ();         OnFinishCommand ();          if (result)             CallbackToken.FireSucceed ();         else             CallbackToken.FireFault ();                  Destroy (this, 1f);     }      protected virtual void OnFinishCommand(){}      public void Terminate(bool result = false)     {         FinishCommand (result);     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u0435\u0442\u043e\u0434 FinishCommand() \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437\u0432\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0442\u043e\u0434 Terminate().<\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0430 Callback<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class SomeController : MonoBehaviour  {     \/\/don't forget to set this in editor     public UnitController _targetUnit;      private void Start()     {         if (_targetUnit != null)         {             Command.ExecuteOn&lt;RegularJumpCommand&gt; (_targetUnit.gameObject,                                                    new object[]{_targetUnit ,new Vector3(0, 10, 0)})                 .CallbackToken.AddCallback (new Callback&lt;Command&gt;(OnJumpFinish));         }     }      private void OnJumpFinish (Command command)     {         Debug.Log(string.Format(&quot;{0}&quot;, &quot;Successfully jumped&quot;));     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0440\u0435\u0448\u0438\u0442\u044c \u0438 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u0430\u043d\u043d\u044b\u0435, (\u0432\u0435\u0434\u044c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0435\u0451 \u0432 callback \u043c\u0435\u0442\u043e\u0434), \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 get-er \u0434\u043b\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u2014 \u0432\u0443\u0430\u043b\u044f.<\/p>\n<h4>\u041a\u043e\u043d\u0435\u0446!<\/h4>\n<p>  \u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0433\u0440 \u043d\u0430 Unity. \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u043c, \u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u0440\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u0441\u043a\u0430\u0447\u0430\u0442\u044c, \u0437\u0430\u043f\u043e\u0441\u0442\u0438\u0442\u044c) \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u0415\u0441\u043b\u0438 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043c\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u043e, \u043d\u043e \u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u0442\u0438\u043c\u0443\u043b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430\u0445, MVC, \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f\u0445 \u0438 \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0436\u0438\u0432\u0435\u0442 \u0438 \u0441\u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>  P.S.: \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u043a\u043e\u0434 \u0437\u0434\u0435\u0441\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/280306\/\"> https:\/\/habrahabr.ru\/post\/280306\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0417\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f. \u042f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0438 \u043b\u044e\u0434\u0438, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0438\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u044f\u0442\u0441\u044f, \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u0433\u0440. \u0418, \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e, \u044f \u0441\u0430\u043c \u043f\u043e\u043d\u044f\u043b \u0432\u0441\u0435 \u043d\u0435 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043d\u0435\u0434\u0435\u043b\u044e. \u041d\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u044f \u0443\u0436\u0435 \u0437\u0430\u0431\u044b\u043b \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0433\u0440\u044b \u0438\u043d\u0430\u0447\u0435. \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439, \u043d\u043e \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043c\u0430\u043b\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u0438 \u0437\u0430\u0447\u0435\u043c \u0438 \u0441 \u0447\u0435\u043c \u044d\u0442\u043e \u0435\u0441\u0442\u044c.<\/p>\n<p>  \u041a\u0430\u043a \u043a\u043e\u0435-\u043a\u0442\u043e \u0443\u0436\u0435 \u043c\u043e\u0433 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u044f \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u201cCommand\u201d \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0433\u0440 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0432\u0438\u0436\u043a\u0430 Unity 3D. \u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435. \u041a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u043c, \u043d\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0430\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.  <\/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-277083","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277083","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=277083"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277083\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}