fr.jeanf.questsystem 0.0.42 → 0.0.44
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.
|
@@ -99,12 +99,8 @@ namespace jeanf.questsystem
|
|
|
99
99
|
#region Instantiations & Loading
|
|
100
100
|
public void InstantiateQuestStep(string id)
|
|
101
101
|
{
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
Debug.Log($"Step with id:[{id}] is already in the list of active steps");
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
|
|
102
|
+
if (stepMap[id].stepStatus != QuestStepStatus.Inactive) return;
|
|
103
|
+
if (activeSteps.ContainsKey(id)) return;
|
|
108
104
|
if (!stepMap.ContainsKey(id)) return;
|
|
109
105
|
|
|
110
106
|
if(!activeSteps.ContainsKey(id)) activeSteps.Add(id,Instantiate(stepMap[id], this.transform, true));
|
|
@@ -114,7 +110,7 @@ namespace jeanf.questsystem
|
|
|
114
110
|
{
|
|
115
111
|
if (activeSteps.ContainsKey(id))
|
|
116
112
|
{
|
|
117
|
-
Destroy(activeSteps[id].gameObject);
|
|
113
|
+
//Destroy(activeSteps[id].gameObject);
|
|
118
114
|
}
|
|
119
115
|
}
|
|
120
116
|
|
|
@@ -84,22 +84,17 @@ namespace jeanf.questsystem
|
|
|
84
84
|
{
|
|
85
85
|
sendQuestStepTooltip.RaiseEvent(string.Empty);
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
Debug.LogWarning("Implement prefab destruction");
|
|
89
|
-
Debug.LogWarning("Implement next trigger calls.");
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
;
|
|
92
88
|
|
|
93
89
|
foreach(QuestStep questStep in questStepsToTrigger)
|
|
94
90
|
{
|
|
95
91
|
sendNextStepId?.Invoke(questStep.stepId);
|
|
96
92
|
}
|
|
97
93
|
stepCompleted?.Invoke(stepId);
|
|
98
|
-
stepActive?.Invoke(stepId, stepStatus);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
// _timelineTriggerEventChannelSo.RaiseEvent(timeline, false);
|
|
94
|
+
stepActive?.Invoke(stepId, stepStatus);
|
|
95
|
+
|
|
96
|
+
if (isDebug) Debug.Log($"Step with id: {stepId} finished. Destroying the gameobject with name {this.name}", this);
|
|
97
|
+
Destroy(this.gameObject);
|
|
103
98
|
}
|
|
104
99
|
|
|
105
100
|
|