// start is only called once. private void Start() { // in order to make sure that we only ever have 1 QuestController we do a check. if (FindObjectsOfType <QuestController>().Length > 1) { // if there is more than 1 QuestController destroy this specific one. Destroy(this.gameObject); } DontDestroyOnLoad(this.gameObject); SceneManager.sceneLoaded += Populate; questDatabase = GetComponent <QuestDatabase>(); }
private void Awake() { questDatabase = GetComponent <QuestDatabase>(); characterController = FindObjectOfType <BattleSystem.CharacterController>(); EventController.OnPendingQuestsComplete += PerformShowAlert; }
private void Start() { questDatabase = GetComponent <QuestDatabase>(); }