| | 1 | | using UnityEngine; |
| | 2 | |
|
| | 3 | | namespace DCL.Tutorial |
| | 4 | | { |
| | 5 | | /// <summary> |
| | 6 | | /// Class that represents the onboarding tutorial step related to how to open the Backpack window from the taskbar. |
| | 7 | | /// </summary> |
| | 8 | | public class TutorialStep_Tooltip_BackpackButton : TutorialStep_Tooltip |
| | 9 | | { |
| | 10 | | public override void OnStepStart() |
| | 11 | | { |
| 1 | 12 | | base.OnStepStart(); |
| | 13 | |
|
| 1 | 14 | | if (tutorialController != null && |
| | 15 | | tutorialController.hudController != null && |
| | 16 | | tutorialController.hudController.profileHud != null) |
| | 17 | | { |
| 0 | 18 | | tutorialController.hudController.profileHud.OnOpen += ProfileHud_OnOpen; |
| | 19 | | } |
| | 20 | |
|
| 1 | 21 | | DataStore.i.exploreV2.isOpen.OnChange += ExploreV2IsOpenChanged; |
| 1 | 22 | | } |
| | 23 | |
|
| | 24 | | public override void OnStepFinished() |
| | 25 | | { |
| 1 | 26 | | base.OnStepFinished(); |
| | 27 | |
|
| 1 | 28 | | if (tutorialController != null && |
| | 29 | | tutorialController.hudController != null && |
| | 30 | | tutorialController.hudController.profileHud != null) |
| | 31 | | { |
| 0 | 32 | | tutorialController.hudController.profileHud.OnOpen -= ProfileHud_OnOpen; |
| | 33 | | } |
| | 34 | |
|
| 1 | 35 | | DataStore.i.exploreV2.isOpen.OnChange -= ExploreV2IsOpenChanged; |
| 1 | 36 | | } |
| | 37 | |
|
| | 38 | | protected override void SetTooltipPosition() |
| | 39 | | { |
| 1 | 40 | | base.SetTooltipPosition(); |
| | 41 | |
|
| 1 | 42 | | if (DataStore.i.exploreV2.profileCardTooltipReference.Get() != null) |
| 0 | 43 | | tooltipTransform.position = DataStore.i.exploreV2.profileCardTooltipReference.Get().position; |
| 1 | 44 | | } |
| | 45 | |
|
| | 46 | | internal void ProfileHud_OnOpen() |
| | 47 | | { |
| 1 | 48 | | tutorialController.SetNextSkippedSteps(0); |
| 1 | 49 | | stepIsFinished = true; |
| 1 | 50 | | } |
| | 51 | |
|
| | 52 | | internal void ExploreV2IsOpenChanged(bool current, bool previous) |
| | 53 | | { |
| 0 | 54 | | if (!current) |
| | 55 | | { |
| 0 | 56 | | tutorialController.SetNextSkippedSteps(7); |
| 0 | 57 | | stepIsFinished = true; |
| | 58 | | } |
| 0 | 59 | | } |
| | 60 | | } |
| | 61 | | } |