Exemple #1
0
    private IEnumerator RandomRespawn()
    {
        float secs = UnityEngine.Random.Range(minRespawnT, maxRespawnT);

        yield return(new WaitForSeconds(secs));

        Enemy1 enem = GameObject.Instantiate(enemy, transform.position, new Quaternion(0, 0, 0, 0)).GetComponent <Enemy1>();

        enem.SetSpawnPoint(this);
        enem.SetSpawnPos(transform.position);
    }