private void Awake() { cam = FindObjectOfType <MonsterDestroyer>(); playerDataSaver = GetComponent <PlayerDataSaver>(); if (playerDataSaver.GetScavHunt() == 1) { StartCoroutine(ResumeScavengerHunt()); } }
public IEnumerator ShowObjectives() { Instantiate(prefabObjectives, mainPanel.transform); if (playerDataSaver.GetScavHunt() == 1) { HuntTasksController.Instance.ResumeHuntingInitialization(taskCompleted); } GameObject player = GameObject.FindGameObjectWithTag("Player"); yield return(new WaitForSeconds(2)); List <Transform> enemiesForDirections = new List <Transform>(); for (int i = 0; i < enemiesAdded.Count; i++) { enemiesForDirections.Add(enemiesAdded[i].transform); } OnShowDirections(player, enemiesForDirections); }