void SpawnPrefab() { GameObject newPrefab = Instantiate(prefab, transform.position, Quaternion.identity) as GameObject; newPrefab.transform.parent = GameController.instance.game.level.transform; spawner.zombies.Add(newPrefab); smashCam.AddTarget(newPrefab.transform); smashCam.CleanUp(); }
void SpawnZombie() { GameObject newDummy = Instantiate(zombieSpawnEffectPrefab, transform.position, Quaternion.identity) as GameObject; newDummy.transform.parent = GameController.instance.game.level.transform; int randomSpawn = Random.Range(0, 4); newDummy.transform.position = currentLevel.startingSpawnPoints[randomSpawn].position; smashCam.AddTarget(newDummy.transform); smashCam.CleanUp(); }