fr.jeanf.questsystem 0.1.5 → 0.1.7
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.
|
@@ -35,6 +35,7 @@ namespace jeanf.questsystem
|
|
|
35
35
|
#region step trigger and completion
|
|
36
36
|
[Header("Quest Step Progression events & Variables")]
|
|
37
37
|
public List<QuestStep> questStepsToTrigger = new List<QuestStep>();
|
|
38
|
+
public List<QuestStep> questStepsTriggeredOnFailure = new List<QuestStep>();
|
|
38
39
|
public delegate void SendNextStepId(string id);
|
|
39
40
|
public static SendNextStepId sendNextStepId;
|
|
40
41
|
|
|
@@ -142,6 +143,13 @@ namespace jeanf.questsystem
|
|
|
142
143
|
protected virtual void ApplyFailureConsequence()
|
|
143
144
|
{
|
|
144
145
|
endStepChannel.RaiseEvent(stepId);
|
|
146
|
+
foreach (QuestStep questStep in questStepsTriggeredOnFailure)
|
|
147
|
+
{
|
|
148
|
+
if (isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Requesting to start next step: {questStep.stepId}", this);
|
|
149
|
+
|
|
150
|
+
//Si questStep.prerequisitesStep are in QuestItem.stepsCompleted
|
|
151
|
+
sendNextStepId?.Invoke(questStep.stepId);
|
|
152
|
+
}
|
|
145
153
|
}
|
|
146
154
|
public void FinishQuestStep()
|
|
147
155
|
{
|