示例#1
0
    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)));
    }
示例#2
0
 void Start()
 {
     points             = _enemyConfiguration.Points();
     transform.position = points[i].transform.position;
     animator           = GetComponent <Animator>();
 }