private IEnumerator InvokeEnemy(EnemyConfiguration enemyConfiguration) { var enemy = Instantiate(enemyConfiguration.Enemy, enemyConfiguration.Points()[0].transform.position, Quaternion.identity); enemy.GetComponent <Enemy>().EnemyConfiguration = enemyConfiguration; yield return(new WaitForSeconds(enemyConfiguration.TimeBreakBeetwenEnemies * Random.Range(0.5f, 1f))); }
void Start() { points = _enemyConfiguration.Points(); transform.position = points[i].transform.position; animator = GetComponent <Animator>(); }