fr.jeanf.questsystem 0.0.45 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -102,16 +102,9 @@ namespace jeanf.questsystem
|
|
|
102
102
|
if (stepMap[id].stepStatus != QuestStepStatus.Inactive) return;
|
|
103
103
|
if (activeSteps.ContainsKey(id)) return;
|
|
104
104
|
if (!stepMap.ContainsKey(id)) return;
|
|
105
|
-
|
|
106
|
-
if(!activeSteps.ContainsKey(id)) activeSteps.Add(id,Instantiate(stepMap[id], this.transform, true));
|
|
107
|
-
}
|
|
108
105
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if (activeSteps.ContainsKey(id))
|
|
112
|
-
{
|
|
113
|
-
//Destroy(activeSteps[id].gameObject);
|
|
114
|
-
}
|
|
106
|
+
Instantiate(stepMap[id], this.transform, true);
|
|
107
|
+
//if(!activeSteps.ContainsKey(id)) activeSteps.Add(id,Instantiate(stepMap[id], this.transform, true));
|
|
115
108
|
}
|
|
116
109
|
|
|
117
110
|
private void LoadDependencies()
|
|
@@ -78,22 +78,27 @@ namespace jeanf.questsystem
|
|
|
78
78
|
|
|
79
79
|
protected void FinishQuestStep()
|
|
80
80
|
{
|
|
81
|
+
if (isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Changing status to completed", this);
|
|
81
82
|
stepStatus = QuestStepStatus.Completed;
|
|
82
83
|
|
|
83
84
|
if (sendQuestStepTooltip != null)
|
|
84
85
|
{
|
|
86
|
+
if (isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending tooltip", this);
|
|
85
87
|
sendQuestStepTooltip.RaiseEvent(string.Empty);
|
|
86
88
|
}
|
|
87
89
|
;
|
|
88
90
|
|
|
89
91
|
foreach(QuestStep questStep in questStepsToTrigger)
|
|
90
92
|
{
|
|
93
|
+
if (isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Requesting to start next step: {questStep.stepId}", this);
|
|
91
94
|
sendNextStepId?.Invoke(questStep.stepId);
|
|
92
95
|
}
|
|
96
|
+
if (isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending stepCompleted Event (delegate) with argument: {stepId}", this);
|
|
93
97
|
stepCompleted?.Invoke(stepId);
|
|
98
|
+
if (isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending stepActive Event (delegate) with arguments: {stepId}, {stepStatus} ", this);
|
|
94
99
|
stepActive?.Invoke(stepId, stepStatus);
|
|
95
100
|
|
|
96
|
-
if (isDebug) Debug.Log($"Step with id: {stepId} finished. Destroying the gameobject with name {this.name}", this);
|
|
101
|
+
if (isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Destroying the gameobject with name {this.name}", this);
|
|
97
102
|
Destroy(this.gameObject);
|
|
98
103
|
}
|
|
99
104
|
|