fr.jeanf.questsystem 0.0.71 → 0.0.72
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.
|
@@ -53,9 +53,12 @@ namespace jeanf.questsystem
|
|
|
53
53
|
[Header("Event Channels")]
|
|
54
54
|
[SerializeField] private StringEventChannelSO sendQuestStepTooltip;
|
|
55
55
|
[SerializeField] private StringEventChannelSO stepValidationOverride;
|
|
56
|
-
[SerializeField] protected StringEventChannelSO abortStepSO;
|
|
56
|
+
//[SerializeField] protected StringEventChannelSO abortStepSO;
|
|
57
57
|
#endregion
|
|
58
58
|
|
|
59
|
+
[Header("Step Parameters")]
|
|
60
|
+
[SerializeField] bool isTimed;
|
|
61
|
+
[SerializeField] float timerDuration;
|
|
59
62
|
#region standard unity methods
|
|
60
63
|
public void OnEnable()
|
|
61
64
|
{
|
|
@@ -63,6 +66,10 @@ namespace jeanf.questsystem
|
|
|
63
66
|
InitializeQuestStep();
|
|
64
67
|
}
|
|
65
68
|
|
|
69
|
+
private void Update()
|
|
70
|
+
{
|
|
71
|
+
|
|
72
|
+
}
|
|
66
73
|
public void OnDisable() => Unsubscribe();
|
|
67
74
|
|
|
68
75
|
public void OnDestroy() => Unsubscribe();
|
|
@@ -70,14 +77,14 @@ namespace jeanf.questsystem
|
|
|
70
77
|
private void Subscribe()
|
|
71
78
|
{
|
|
72
79
|
QuestItem.ValidateStepEvent += ValidateCurrentStep;
|
|
73
|
-
if (abortStepSO) abortStepSO.OnEventRaised += ctx => AbortStep(ctx);
|
|
80
|
+
//if (abortStepSO) abortStepSO.OnEventRaised += ctx => AbortStep(ctx);
|
|
74
81
|
if(stepValidationOverride) stepValidationOverride.OnEventRaised += ValidateCurrentStep;
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
protected virtual void Unsubscribe()
|
|
78
85
|
{
|
|
79
86
|
QuestItem.ValidateStepEvent -= ValidateCurrentStep;
|
|
80
|
-
if (abortStepSO) abortStepSO.OnEventRaised -= ctx => AbortStep(ctx);
|
|
87
|
+
//if (abortStepSO) abortStepSO.OnEventRaised -= ctx => AbortStep(ctx);
|
|
81
88
|
if (stepValidationOverride) stepValidationOverride.OnEventRaised -= ValidateCurrentStep;
|
|
82
89
|
}
|
|
83
90
|
#endregion
|
|
@@ -123,13 +130,13 @@ namespace jeanf.questsystem
|
|
|
123
130
|
{
|
|
124
131
|
Destroy(this.gameObject);
|
|
125
132
|
}
|
|
126
|
-
public void AbortStep(string id)
|
|
127
|
-
{
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
+
//public void AbortStep(string id)
|
|
134
|
+
//{
|
|
135
|
+
// if (id == this.stepId)
|
|
136
|
+
// {
|
|
137
|
+
// Destroy(this.gameObject);
|
|
138
|
+
// }
|
|
139
|
+
//}
|
|
133
140
|
public void FinishQuestStep()
|
|
134
141
|
{
|
|
135
142
|
if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Changing status to completed", this);
|