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