Пример #1
0
    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]);
        }
    }
Пример #2
0
 private void Update()
 {
     speed = startSpeed * multi.getSpeedMulti(gameObject.tag);
 }