Синтаксис:
Используется csharp
if (stat == 1 && dir == 1)
{ animation["Turn"].wrapMode = WrapMode.Once;
animation.Play("Turn");
timer += Time.deltaTime;
if (timer >= 0.4)
{timer = 0;
gameObject.transform.rotation = new Quaternion (0,180,0,0);
gameObject.transform.Translate(-4,0,-2);
dir = 0;
stat = 0;
}
} ;
{ animation["Turn"].wrapMode = WrapMode.Once;
animation.Play("Turn");
timer += Time.deltaTime;
if (timer >= 0.4)
{timer = 0;
gameObject.transform.rotation = new Quaternion (0,180,0,0);
gameObject.transform.Translate(-4,0,-2);
dir = 0;
stat = 0;
}
} ;