fr.jeanf.questsystem 0.1.6 → 0.1.8
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.
|
@@ -212,7 +212,7 @@ namespace jeanf.questsystem
|
|
|
212
212
|
//quest.GetQuestData();
|
|
213
213
|
// serialize using JsonUtility, but use whatever you want here (like JSON.NET)
|
|
214
214
|
string serializedData = JsonUtility.ToJson(questData);
|
|
215
|
-
Debug.Log($"saved data {serializedData}");
|
|
215
|
+
if(isDebug) Debug.Log($"saved data {serializedData}");
|
|
216
216
|
// saving to PlayerPrefs is just a quick example for this tutorial video,
|
|
217
217
|
// you probably don't want to save this info there long-term.
|
|
218
218
|
// instead, use an actual Save & Load system and write to a file, the cloud, etc..
|
|
@@ -34,7 +34,7 @@ namespace jeanf.questsystem
|
|
|
34
34
|
|
|
35
35
|
#region step trigger and completion
|
|
36
36
|
[Header("Quest Step Progression events & Variables")]
|
|
37
|
-
public List<QuestStep>
|
|
37
|
+
public List<QuestStep> questStepsToTrigger = new List<QuestStep>();
|
|
38
38
|
public List<QuestStep> questStepsTriggeredOnFailure = new List<QuestStep>();
|
|
39
39
|
public delegate void SendNextStepId(string id);
|
|
40
40
|
public static SendNextStepId sendNextStepId;
|
|
@@ -120,8 +120,8 @@ namespace jeanf.questsystem
|
|
|
120
120
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
if(isDebug) Debug.Log($"Step with id [{stepId}] has {
|
|
124
|
-
foreach(QuestStep questStep in
|
|
123
|
+
if(isDebug) Debug.Log($"Step with id [{stepId}] has {questStepsToTrigger.Count} childSteps");
|
|
124
|
+
foreach(QuestStep questStep in questStepsToTrigger)
|
|
125
125
|
{
|
|
126
126
|
if(isDebug) Debug.Log($"sending childstep to initialization: {questStep.name}, stepId: [{questStep.stepId}]");
|
|
127
127
|
childStep?.Invoke(questStep);
|
|
@@ -168,7 +168,7 @@ namespace jeanf.questsystem
|
|
|
168
168
|
if (isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending stepActive Event (delegate) with arguments: {stepId}, {stepStatus} ", this);
|
|
169
169
|
stepActive?.Invoke(stepId, stepStatus);
|
|
170
170
|
|
|
171
|
-
foreach (QuestStep questStep in
|
|
171
|
+
foreach (QuestStep questStep in questStepsToTrigger)
|
|
172
172
|
{
|
|
173
173
|
if (isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Requesting to start next step: {questStep.stepId}", this);
|
|
174
174
|
|