{"id":220837,"date":"2014-04-25T15:44:04","date_gmt":"2014-04-25T11:44:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=220837"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=220837","title":{"rendered":"<span class=\"post_title\">\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0441 iTween<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/ea0\/7a4\/ad9\/ea07a4ad9613d9ec9be36d7cfc053371.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0438\u0433\u0440\u0435? \u0417\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0433\u043b\u0443\u043f\u043e, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0433\u0440\u0435 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u043a\u0430\u043a\u0430\u044f, \u043d\u043e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0438\u043c\u0435\u0442\u044c \u0441 \u043d\u0435\u0439 \u0434\u0435\u043b\u043e. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0436\u0438\u0437\u043d\u044c. \u041d\u043e \u0437\u0430\u0447\u0435\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439, \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e!? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <b>iTween<\/b>.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435: <a href=\"http:\/\/itween.pixelplacement.com\">http:\/\/itween.pixelplacement.com<\/a><br \/>  iTween \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. \u0421 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441\u0446\u0435\u043d\u044b, \u043d\u043e \u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0446\u0432\u0435\u0442, \u0440\u0430\u0437\u043c\u0435\u0440, \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e\u043b\u0438\u0433\u043e\u043d \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0439. <\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c iTween-package \u0438\u0437<b> Asset store<\/b>: <a href=\"https:\/\/www.assetstore.unity3d.com\">https:\/\/www.assetstore.unity3d.com<\/a> \u0412 Unity \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/7a6\/56b\/84a\/7a656b84a63a32c00cd6fa8976034f62.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0441\u0446\u0435\u043d\u0443 \u0441 \u0442\u0430\u043a\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/9e5\/88a\/63c\/9e588a63ca4fea51ea570779ba9423ab.png\" alt=\"image\"\/><\/p>\n<p>  \u041a\u0443\u0431 \u2014 \u044d\u0442\u043e \u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 iTween. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442-\u0441\u043a\u0440\u0438\u043f\u0442 \u0442\u0438\u043f\u0430 <b>C#<\/b> \u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u043c\u0435\u0442\u043e\u0434 Start:<\/p>\n<pre><code>void Start() {         iTween.RotateFrom(gameObject, iTween.Hash(&quot;y&quot;, 90.0f, &quot;time&quot;, 2.0f, &quot;easetype&quot;, iTween.EaseType.easeInExpo));         iTween.MoveFrom(gameObject, iTween.Hash(&quot;y&quot;, 3.5f, &quot;time&quot;, 2.0f, &quot;easetype&quot;, iTween.EaseType.easeInExpo));         iTween.ShakePosition(Camera.main.gameObject, iTween.Hash(&quot;y&quot;, 0.3f, &quot;time&quot;, 0.8f, &quot;delay&quot;, 2.0f));         iTween.ColorTo(gameObject, iTween.Hash(&quot;r&quot;, 1.0f, &quot;g&quot;, 0.5f, &quot;b&quot;, 0.4f, &quot;delay&quot;, 1.5f, &quot;time&quot;, 0.3f));         iTween.ScaleTo(gameObject, iTween.Hash(&quot;y&quot;, 1.75f, &quot;delay&quot;, 2.8f, &quot;time&quot;, 2.0f));         iTween.RotateBy(gameObject, iTween.Hash(&quot;x&quot;, 0.5f, &quot;delay&quot;, 4.4f));         iTween.MoveTo(gameObject, iTween.Hash(&quot;y&quot;, 1.5f, &quot;delay&quot;, 5.8f));         iTween.MoveTo(gameObject, iTween.Hash(&quot;y&quot;, 0.5f, &quot;delay&quot;, 7.0f, &quot;easetype&quot;, iTween.EaseType.easeInExpo));         iTween.ScaleTo(gameObject, iTween.Hash(&quot;y&quot;, 1.0f, &quot;delay&quot;, 7.0f));         iTween.ShakePosition(Camera.main.gameObject, iTween.Hash(&quot;y&quot;, 0.3f, &quot;time&quot;, 0.8f, &quot;delay&quot;, 8.0f));         iTween.ColorTo(gameObject, iTween.Hash(&quot;r&quot;, 0.165f, &quot;g&quot;, 0.498f, &quot;b&quot;, 0.729f, &quot;delay&quot;, 8.5f, &quot;time&quot;, 0.5f));          iTween.CameraFadeAdd();         iTween.CameraFadeTo(iTween.Hash(&quot;amount&quot;, 1.0f, &quot;time&quot;, 2.0f, &quot;delay&quot;, 10.0f)); } <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438?<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/c4e\/a24\/949\/c4ea2494911c3dbcb32ac4cc1166caaf.gif\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0441\u043a\u0440\u0438\u043f\u0442. <\/p>\n<pre><code>iTween.RotateFrom(gameObject, iTween.Hash(&quot;y&quot;, 90.0f, &quot;time&quot;, 2.0f, &quot;easetype&quot;, iTween.EaseType.easeInExpo));<\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434 <b>RotateFrom <\/b>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 <b>RotateTo <\/b>\u0438 <b>RotateBy<\/b>, <b>RotateFrom <\/b>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0443\u0433\u043b\u043e\u043c \u0438 \u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u041c\u0435\u0442\u043e\u0434, \u043a\u0430\u043a \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445, \u0438\u043c\u0435\u0435\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0443. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0438\u043b\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:  <\/p>\n<pre><code>RotateFrom(GameObject target, Vector3 rotation, float time); RotateFrom(GameObject target, Hashtable args);<\/code><\/pre>\n<p>  \u041c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c <b>gameObject <\/b> \u2014 \u043e\u0431\u044c\u0435\u043a\u0442, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435:  <\/p>\n<pre><code>Hashtable args = new Hashtable(); args.Add(\u201cy\u201d, 90.0f); args.Add(\u201ctime\u201d, 2.0f); args.Add(\u201ceasetype\u201d, iTween.EaseType.easeInExpo);<\/code><\/pre>\n<p>  \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b>iTween.Hash<\/b> \u2014 \u044d\u043a\u0441\u043f\u0440\u0435\u0441\u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 <b>Hashtable<\/b>. \u0412 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 y=90.0f, \u044d\u0442\u043e \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442 (\u0435\u0441\u043b\u0438 x \u0438 z \u0440\u0430\u0432\u043d\u044b \u043d\u0443\u043b\u044e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e)  <\/p>\n<pre><code class=\"cs\">Quaternion.Euler( new Vector3(0f, 90.0f, 0f) ) <\/code><\/pre>\n<p>  \u0422\u043e\u0442 \u043f\u043e\u0432\u043e\u0440\u043e\u0442, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0447\u043d\u0451\u0442\u0441\u044f \u043d\u0430\u0448\u0435 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435.  <\/p>\n<pre><code class=\"cs\">time=2.0f <\/code><\/pre>\n<p>  \u0412\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043e \u043d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e. \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u201c<b>speed<\/b>\u201d, \u0432 \u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0432\u0440\u0435\u043c\u044f, \u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u044d\u0442\u043e <b>easetype=iTween.EaseType.easeInExpo<\/b>. easetype \u044d\u0442\u043e \u0444\u043e\u0440\u043c\u0430 \u043a\u0440\u0438\u0432\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438. \u0412\u043e\u0442 \u043a\u0440\u0438\u0432\u044b\u0435 \u0432 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/f7b\/65e\/8e7\/f7b65e8e7024fcdeecb308e97d4621fe.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"cs\"> iTween.MoveFrom(gameObject, iTween.Hash(&quot;y&quot;, 3.5f, &quot;time&quot;, 2.0f, &quot;easetype&quot;, iTween.EaseType.easeInExpo));  <\/code><\/pre>\n<p><b>MoveFrom <\/b>\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443, \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"cs\">iTween.ShakePosition(Camera.main.gameObject, iTween.Hash(&quot;y&quot;, 0.3f, &quot;time&quot;, 0.8f, &quot;delay&quot;, 2.0f)); <\/code><\/pre>\n<p><b>ShakePosition <\/b>\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u201c\u0442\u0440\u044f\u0441\u043a\u0443\u201d \u043a\u0430\u043c\u0435\u0440\u044b. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0435, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e, \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0442\u043e\u0447\u043a\u0430\u0445, \u0432 \u043e\u0442\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0435\u043c\u0443 \u0440\u0430\u043c\u043a\u0430\u0445. \u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u201c<b>delay<\/b>\u201d, \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"cs\">iTween.ColorTo(gameObject, iTween.Hash(&quot;r&quot;, 1.0f, &quot;g&quot;, 0.5f, &quot;b&quot;, 0.4f, &quot;delay&quot;, 1.5f, &quot;time&quot;, 0.3f)); <\/code><\/pre>\n<p><b>ColorTo <\/b>\u043f\u043b\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u0446\u0432\u0435\u0442 \u043e\u0431\u044c\u0435\u043a\u0442\u0430 \u0441 \u0442\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<pre><code class=\"cs\">iTween.ScaleTo(gameObject, iTween.Hash(&quot;y&quot;, 1.75f, &quot;delay&quot;, 2.8f, &quot;time&quot;, 2.0f)); <\/code><\/pre>\n<p><b>ScaleTo<\/b>, \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0438\u043c\u0435\u043d\u0438 \u043c\u0435\u0442\u043e\u0434\u0430, \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. <\/p>\n<pre><code class=\"cs\">iTween.RotateBy(gameObject, iTween.Hash(&quot;x&quot;, 0.5f, &quot;delay&quot;, 4.4f)); <\/code><\/pre>\n<p><b>RotateBy <\/b>\u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 <b>RotateFrom<\/b>, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 360 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 (\u0445\u043e\u0442\u044f, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u043c <b>RotateTo<\/b>). \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 <i>z=2.0f<\/i>, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u043e\u0441\u0438 Z \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<pre><code class=\"cs\">iTween.MoveTo(gameObject, iTween.Hash(&quot;y&quot;, 1.5f, &quot;delay&quot;, 5.8f)); iTween.MoveTo(gameObject, iTween.Hash(&quot;y&quot;, 0.5f, &quot;delay&quot;, 7.0f, &quot;easetype&quot;, iTween.EaseType.easeInExpo)); <\/code><\/pre>\n<p><b>MoveTo<\/b>, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u0441\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <b>iTween<\/b>. \u041e\u043d \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0437\u0430 \u043e\u0442\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0418\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0432\u0441\u0451 \u0442\u043e\u043c \u0436\u0435 easetype, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0430\u043c \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:  <\/p>\n<pre><code class=\"cs\">iTween.CameraFadeAdd(); iTween.CameraFadeTo(iTween.Hash(&quot;amount&quot;, 1.0f, &quot;time&quot;, 2.0f, &quot;delay&quot;, 10.0f)); <\/code><\/pre>\n<p><b>CameraFadeAdd <\/b>\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u0437\u0430\u0442\u0435\u043c\u043d\u0435\u043d\u0438\u044f. \u0413\u043b\u0443\u0431\u0438\u043d\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438:  <\/p>\n<pre><code class=\"cs\">CameraFadeAdd() CameraFadeAdd(Texture2D texture) CameraFadeAdd(Texture2D texture, int depth) <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 <b>Texture2D<\/b>, \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0451\u0440\u043d\u044b\u0439 \u0446\u0432\u0435\u0442.<\/p>\n<p>  \u0418\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043b, \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0432\u0430\u0436\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c:  <\/p>\n<pre><code class=\"cs\">public class iTweenController : MonoBehaviour {     int clbkN = 0;     GUIStyle style;      void Awake()     {         style = new GUIStyle();         style.fontSize = 60;     }      void Start()     {         iTween.MoveTo(gameObject, iTween.Hash(&quot;position&quot;, new Vector3(5.0f, 1.0f, 0.0f), &quot;oncomplete&quot;, &quot;myClbk&quot;,             &quot;loopType&quot;, iTween.LoopType.loop, &quot;speed&quot;, 2.0f));     }      void myClbk()     {         clbkN++;     }      void OnGUI()     {         GUI.Label(new Rect(10, 10, 0, 0), &quot;Callback # &quot;+clbkN, style);     } }  <\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0438\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/33c\/c33\/b26\/33cc33b26baf1d7e3146e383a9845092.gif\" alt=\"image\"\/><\/p>\n<p>  \u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u0430 <b>MoveTo<\/b>: <\/p>\n<pre><code class=\"cs\">position = new Vector3(5.0f, 1.0f, 0.0f) <\/code><\/pre>\n<p>\u042d\u0442\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c, \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0430\u044f <i>\u201cx\u201d, 5.0f, \u201cy\u201d, 1.0f, \u201cz\u201d, 0.0f<\/i><\/p>\n<pre><code class=\"cs\">oncomplete = &quot;myClbk&quot; <\/code><\/pre>\n<p>\u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 (\u043b\u0438\u0431\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438) \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c.<\/p>\n<pre><code class=\"cs\">loopType = iTween.LoopType.loop <\/code><\/pre>\n<p>\u0412\u0438\u0434 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b, \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0437\u0430\u043a\u043e\u043d\u0447\u0443. \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \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\/220837\/\"> http:\/\/habrahabr.ru\/post\/220837\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/ea0\/7a4\/ad9\/ea07a4ad9613d9ec9be36d7cfc053371.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0438\u0433\u0440\u0435? \u0417\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0433\u043b\u0443\u043f\u043e, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0433\u0440\u0435 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u043a\u0430\u043a\u0430\u044f, \u043d\u043e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0438\u043c\u0435\u0442\u044c \u0441 \u043d\u0435\u0439 \u0434\u0435\u043b\u043e. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0436\u0438\u0437\u043d\u044c. \u041d\u043e \u0437\u0430\u0447\u0435\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439, \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e!? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <b>iTween<\/b>.  <\/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-220837","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/220837","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=220837"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/220837\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=220837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=220837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=220837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}