SpawnManager Flashcards

1
Q

public GameObject obstaclePrefabs;

private Vector3 spawnPos = new Vector3 (25,0,0);

A
void Start()
{
Instantiate(obstaclePrefabs, spawnPos, obstaclePrefabs.transform.rotation);
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

private float startDelay = 2;

private float repeateRate = 1;

A
void Start(){ InvokeRepeating ("SpawnObstacle",startDelay, repeateRate);
}
void SpawnObstacle(){
Instantiate(obstaclePrefabs, spawnPos, obstaclePrefabs.transform.rotation);
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

public GameObject enemyPrefab;

A

Instantiate(enemyPrefab, randomPos, enemyPrefab.gameObject.transform.rotation);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly