IEnumerator cryogen() { Debug.Log("Ученый"); //Получаем старые значения множителей for (int i = 0; i < enemyMulti.Length; i++) { previousMultiSpeed[i] = multi.getSpeedMulti(enemyMulti[i]); } for (int i = 0; i < enemyMulti.Length; i++) { multi.setSpeedMulti(0, enemyMulti[i]); } for (int i = 0; i < enemyMulti.Length; i++) { Debug.Log(multi.getSpeedMulti(enemyMulti[i])); } yield return(new WaitForSecondsRealtime(5)); for (int i = 0; i < enemyMulti.Length; i++) { multi.setSpeedMulti(previousMultiSpeed[i], enemyMulti[i]); } }
private void Update() { speed = startSpeed * multi.getSpeedMulti(gameObject.tag); }