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("Events")]
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
- DisplayActiveQuestStep();
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
- sendQuestStepTooltip.RaiseEvent("questStepToSend");
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
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 2e228ef08dc25924da5c962c09000c7a
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: e83615f483cdf7e459c9aab12c6be844
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.questsystem",
3
- "version":"0.0.17",
3
+ "version":"0.0.19",
4
4
  "displayName":"Quest system",
5
5
  "description":"This package uses Scriptable Objects to define quests.",
6
6
  "unity": "2021.3",