fr.jeanf.questsystem 0.0.54 → 0.0.56

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.
@@ -49,7 +49,7 @@ namespace jeanf.questsystem
49
49
 
50
50
 
51
51
 
52
- private void OnEnable()
52
+ public void OnEnable()
53
53
  {
54
54
  InitializeQuestStep();
55
55
  }
@@ -58,9 +58,9 @@ namespace jeanf.questsystem
58
58
  public void InitializeQuestStep()
59
59
  {
60
60
  // failsafe to avoid lauching the same step more than once at a time.
61
- // if (stepStatus == QuestStepStatus.Active) return;
61
+ if (stepStatus == QuestStepStatus.Active) return;
62
62
 
63
- Debug.Log($"Initializing questStep [{stepId}] with for quest with questId: [{questId}]");
63
+ if(isDebug) Debug.Log($"Initializing questStep [{stepId}] with for quest with questId: [{questId}]");
64
64
 
65
65
  stepStatus = QuestStepStatus.Active;
66
66
  stepActive?.Invoke(stepId, stepStatus);
@@ -72,14 +72,14 @@ namespace jeanf.questsystem
72
72
  }
73
73
  if (isUsingIntroTimeline && timeline)
74
74
  {
75
- Debug.Log($"sending trigger to timeline: {timeline.name}, triggerValue: true");
75
+ if(isDebug) Debug.Log($"sending trigger to timeline: {timeline.name}, triggerValue: true");
76
76
  _timelineTriggerEventChannelSo.RaiseEvent(timeline, true);
77
77
  }
78
78
 
79
79
  if(isDebug) Debug.Log($"Step with id [{stepId}] has {questStepsToTrigger.Count} childSteps");
80
80
  foreach(QuestStep questStep in questStepsToTrigger)
81
81
  {
82
- Debug.Log($"sending childstep to initialization: {questStep.name}, stepId: [{questStep.stepId}]");
82
+ if(isDebug) Debug.Log($"sending childstep to initialization: {questStep.name}, stepId: [{questStep.stepId}]");
83
83
  childStep?.Invoke(questStep);
84
84
  }
85
85
  }
@@ -88,27 +88,27 @@ namespace jeanf.questsystem
88
88
 
89
89
  protected void FinishQuestStep()
90
90
  {
91
- Debug.Log($" ---- Step with id: {stepId} finished. Changing status to completed", this);
91
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Changing status to completed", this);
92
92
  stepStatus = QuestStepStatus.Completed;
93
93
 
94
94
  if (sendQuestStepTooltip != null)
95
95
  {
96
- Debug.Log($" ---- Step with id: {stepId} finished. Sending tooltip", this);
96
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending tooltip", this);
97
97
  sendQuestStepTooltip.RaiseEvent(string.Empty);
98
98
  }
99
99
  ;
100
100
 
101
101
  foreach(QuestStep questStep in questStepsToTrigger)
102
102
  {
103
- Debug.Log($" ---- Step with id: {stepId} finished. Requesting to start next step: {questStep.stepId}", this);
103
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Requesting to start next step: {questStep.stepId}", this);
104
104
  sendNextStepId?.Invoke(questStep.stepId);
105
105
  }
106
- Debug.Log($" ---- Step with id: {stepId} finished. Sending stepCompleted Event (delegate) with argument: {stepId}", this);
106
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending stepCompleted Event (delegate) with argument: {stepId}", this);
107
107
  stepCompleted?.Invoke(stepId);
108
- Debug.Log($" ---- Step with id: {stepId} finished. Sending stepActive Event (delegate) with arguments: {stepId}, {stepStatus} ", this);
108
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending stepActive Event (delegate) with arguments: {stepId}, {stepStatus} ", this);
109
109
  stepActive?.Invoke(stepId, stepStatus);
110
110
 
111
- Debug.Log($" ---- Step with id: {stepId} finished. Destroying the gameobject with name {this.name}", this);
111
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Destroying the gameobject with name {this.name}", this);
112
112
  Destroy(this.gameObject);
113
113
  }
114
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.questsystem",
3
- "version":"0.0.54",
3
+ "version":"0.0.56",
4
4
  "displayName":"Quest system",
5
5
  "description":"This package uses Scriptable Objects to define quests.",
6
6
  "unity": "2021.3",