Код
selected = false;
weaponAnim[WeaponsList[currentWeapon].drawAnimation].speed = -WeaponsList[currentWeapon].drawAnimSpeed;
weaponAnim.Play(WeaponsList[currentWeapon].drawAnimation);
weaponAnim.CrossFade(WeaponsList[currentWeapon].drawAnimation);
yield return new WaitForSeconds(WeaponsList[currentWeapon].drawTime);
foreach (WeaponSettings set in WeaponsList)
{
set.Weapon.SetActive(false);
}
currentWeapon = i;
weaponAnim = WeaponsList[currentWeapon].Weapon.GetComponent<Animation>();
WeaponsList[currentWeapon].Weapon.SetActive(true);
wepSounds.PlayOneShot(WeaponsList[currentWeapon].soundDraw, 0.5F);
weaponAnim[WeaponsList[currentWeapon].drawAnimation].speed = WeaponsList[currentWeapon].drawAnimSpeed;
weaponAnim.Play(WeaponsList[currentWeapon].drawAnimation, PlayMode.StopAll);
weaponAnim.CrossFade(WeaponsList[currentWeapon].drawAnimation);
walk.moveTo = WeaponsList[currentWeapon].moveTo;
walk.rotateTo = WeaponsList[currentWeapon].rotateTo;
yield return new WaitForSeconds(WeaponsList[currentWeapon].drawTime);
selected = true;
При отключении оружия должна воспроизводится реверсированная анимация вытаскивания, но она не работает