void Awake() { persistentData = GameObject.FindGameObjectWithTag (Tags.mainCamera).GetComponent<PersistentData> (); availableSpawnPoints = GetComponent<AvailableSpawnPoints> (); playerTransform = GameObject.FindGameObjectWithTag (Tags.player).transform; playerPosition = availableSpawnPoints.spawnPoints [persistentData.nextSpawnPoint].position; cameraTransform = GameObject.FindGameObjectWithTag (Tags.mainCamera).transform; }
void Awake() { persistentData = GameObject.FindGameObjectWithTag (Tags.mainCamera).GetComponent<PersistentData> (); availableSpawnPoints = GetComponent<AvailableSpawnPoints> (); npcPosition = availableSpawnPoints.spawnPoints [persistentData.nextSpawnPoint].position; }