Skip to content
Snippets Groups Projects
Commit 7ccc5c6d authored by Leo Cardhio's avatar Leo Cardhio
Browse files

[refactor] reuse questmanager awake on bossquestmanager

parent 9ee54c97
1 merge request!10Feat/story scene
...@@ -4,21 +4,6 @@ using UnityEngine; ...@@ -4,21 +4,6 @@ using UnityEngine;
public class BossQuestManager : QuestManager public class BossQuestManager : QuestManager
{ {
void Awake() {
GameManager gameManager = FindObjectOfType<GameManager>();
if (gameManager != null)
{
gameManager.isBoss = false;
}
if (questManager == null)
{
questManager = this;
}
else
{
Destroy(questManager);
}
}
void Start() { void Start() {
quests[0] = GenerateQuest(); quests[0] = GenerateQuest();
ShowQuestToUI(); ShowQuestToUI();
......
...@@ -23,7 +23,7 @@ public class QuestManager : MonoBehaviour ...@@ -23,7 +23,7 @@ public class QuestManager : MonoBehaviour
public static QuestManager questManager; public static QuestManager questManager;
void Awake() protected void Awake()
{ {
GameManager gameManager = FindObjectOfType<GameManager>(); GameManager gameManager = FindObjectOfType<GameManager>();
if (gameManager != null) if (gameManager != null)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment