fr.jeanf.questsystem 0.0.42 → 0.0.43

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 (activeSteps.ContainsKey(id))
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));
@@ -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
- // stops the timeline in case it were playing
101
- // this may cause issue of timing so disabled it to test.
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);
103
98
  }
104
99
 
105
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.questsystem",
3
- "version":"0.0.42",
3
+ "version":"0.0.43",
4
4
  "displayName":"Quest system",
5
5
  "description":"This package uses Scriptable Objects to define quests.",
6
6
  "unity": "2021.3",