Beispiel #1
0
 public void InitiateSpawn(GameObject prefabToSpawn, GameObject spawnVisualPrefab, SpawnedObjectCallback callback)
 {
     this.PrefabToSpawn = prefabToSpawn;
     this.SpawnCallback = callback;
     Instantiate(spawnVisualPrefab, this.transform.position, Quaternion.identity);
     this.GetComponent <TimedCallbacks>().AddCallback(this, this.Spawn, this.SpawnDelay);
 }
Beispiel #2
0
 public void InitiateSpawn(GameObject prefabToSpawn, GameObject spawnVisualPrefab, SpawnedObjectCallback callback)
 {
     this.PrefabToSpawn = prefabToSpawn;
     this.SpawnCallback = callback;
     Instantiate(spawnVisualPrefab, this.transform.position, Quaternion.identity);
     this.GetComponent<TimedCallbacks>().AddCallback(this, this.Spawn, this.SpawnDelay);
 }