Esempio n. 1
0
    public IEnumerator RespawnObject()
    {
        yield return(new WaitForSeconds(respawnTime));

        currentObject = Instantiate(objectPrefab, transform.position, transform.rotation);
        despawner     = currentObject.GetComponent <Despawner>();
        despawner.SetSpawner(this);
    }
Esempio n. 2
0
 void Start()
 {
     currentObject = Instantiate(objectPrefab, transform.position, transform.rotation);
     despawner     = currentObject.GetComponent <Despawner>();
     despawner.SetSpawner(this);
 }