< Summary

Class:DCL.Tutorial.TutorialStep_Tooltip_UsersAround
Assembly:Onboarding
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Tutorial/Scripts/Steps/Initial/TutorialStep_Tooltip_UsersAround.cs
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:58
Line coverage:0% (0 of 16)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
OnStepStart()0%20400%
OnStepFinished()0%20400%
SetTooltipPosition()0%20400%
UsersAroundListHud_OnOpen()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Tutorial/Scripts/Steps/Initial/TutorialStep_Tooltip_UsersAround.cs

#LineLine coverage
 1using DCL.Helpers;
 2using UnityEngine;
 3
 4namespace DCL.Tutorial
 5{
 6    /// <summary>
 7    /// Class that represents the onboarding tutorial step related to how to view the players in scene and configure voi
 8    /// </summary>
 9    public class TutorialStep_Tooltip_UsersAround : TutorialStep_Tooltip
 10    {
 11        private const string PLAYER_PREFS_VOICE_CHAT_FEATURE_SHOWED = "VoiceChatFeatureShowed";
 12
 13        public override void OnStepStart()
 14        {
 015            base.OnStepStart();
 16
 017            if (tutorialController != null &&
 18                tutorialController.hudController != null &&
 19                tutorialController.hudController.usersAroundListHud != null)
 20            {
 021                tutorialController.hudController.usersAroundListHud.OnOpen += UsersAroundListHud_OnOpen;
 22            }
 023        }
 24
 25        public override void OnStepFinished()
 26        {
 027            base.OnStepFinished();
 28
 29            // TODO (Santi): This a TEMPORAL fix. It will be removed when we refactorize the tutorial system in order to
 030            PlayerPrefsUtils.SetInt(PLAYER_PREFS_VOICE_CHAT_FEATURE_SHOWED, 1);
 31
 032            if (tutorialController != null &&
 33                tutorialController.hudController != null &&
 34                tutorialController.hudController.usersAroundListHud != null)
 35            {
 036                tutorialController.hudController.usersAroundListHud.OnOpen -= UsersAroundListHud_OnOpen;
 37            }
 038        }
 39
 40        protected override void SetTooltipPosition()
 41        {
 042            base.SetTooltipPosition();
 43
 044            if (tutorialController != null &&
 45                tutorialController.hudController != null &&
 46                tutorialController.hudController.minimapHud.usersAroundTooltipReference)
 47            {
 048                tooltipTransform.position = tutorialController.hudController.minimapHud.usersAroundTooltipReference.posi
 49            }
 050        }
 51
 52        private void UsersAroundListHud_OnOpen()
 53        {
 054            stepIsFinished = true;
 055            tutorialController.PlayTeacherAnimation(TutorialTeacher.TeacherAnimation.QuickGoodbye);
 056        }
 57    }
 58}