fr.jeanf.questsystem 0.0.17 → 0.0.19
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
using jeanf.EventSystem;
|
|
2
2
|
using jeanf.propertyDrawer ;
|
|
3
|
+
using jeanf.tooltip;
|
|
3
4
|
using UnityEngine;
|
|
4
5
|
using UnityEngine.Playables;
|
|
5
6
|
|
|
@@ -21,8 +22,12 @@ namespace jeanf.questsystem
|
|
|
21
22
|
public PlayableAsset timeline;
|
|
22
23
|
|
|
23
24
|
|
|
24
|
-
[Header("
|
|
25
|
+
[Header("Event Channels")]
|
|
25
26
|
[SerializeField] private StringEventChannelSO sendQuestStepTooltip;
|
|
27
|
+
|
|
28
|
+
[Header("Quest Tooltip")]
|
|
29
|
+
[SerializeField] private QuestTooltipSO questTooltipSO;
|
|
30
|
+
|
|
26
31
|
public void InitializeQuestStep(string questId, int stepIndex, string questStepState)
|
|
27
32
|
{
|
|
28
33
|
this.questId = questId;
|
|
@@ -32,7 +37,10 @@ namespace jeanf.questsystem
|
|
|
32
37
|
SetQuestStepState(questStepState);
|
|
33
38
|
|
|
34
39
|
}
|
|
35
|
-
|
|
40
|
+
if (sendQuestStepTooltip != null)
|
|
41
|
+
{
|
|
42
|
+
DisplayActiveQuestStep();
|
|
43
|
+
}
|
|
36
44
|
if (isUsingIntroTimeline && timeline)
|
|
37
45
|
{
|
|
38
46
|
if(isDebug) Debug.Log($"sending trigger to timeline: {timeline.name}, triggerValue: true");
|
|
@@ -65,8 +73,10 @@ namespace jeanf.questsystem
|
|
|
65
73
|
|
|
66
74
|
protected void DisplayActiveQuestStep()
|
|
67
75
|
{
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
if (questTooltipSO != null)
|
|
77
|
+
{
|
|
78
|
+
sendQuestStepTooltip.RaiseEvent(questTooltipSO.Tooltip);
|
|
79
|
+
}
|
|
70
80
|
}
|
|
71
81
|
protected abstract void SetQuestStepState(string state);
|
|
72
82
|
public bool isDebug { get; set; }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
using System.Collections;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
using jeanf.tooltip;
|
|
5
|
+
|
|
6
|
+
namespace jeanf.questsystem
|
|
7
|
+
{
|
|
8
|
+
[CreateAssetMenu(fileName = "ControlsTooltipSO", menuName = "Tooltips/QuestTooltipSO", order = 1)]
|
|
9
|
+
public class QuestTooltipSO : TooltipSO
|
|
10
|
+
{
|
|
11
|
+
public string tooltipToSend;
|
|
12
|
+
public override string Tooltip
|
|
13
|
+
{
|
|
14
|
+
get
|
|
15
|
+
{
|
|
16
|
+
return tooltipToSend;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|