< Summary

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
OnStepStart()0%56700%
SetupAlicePosition()0%20400%
OnStepExecute()0%12300%

File(s)

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

#LineLine coverage
 1using System.Collections;
 2
 3namespace DCL.Tutorial
 4{
 5    /// <summary>
 6    /// Class that represents the onboarding tutorial step related to how to lock/unlock the cursor.
 7    /// </summary>
 8    public class TutorialStep_LockTheCursor : TutorialStep
 9    {
 10        public override void OnStepStart()
 11        {
 012            base.OnStepStart();
 13
 014            if (tutorialController == null)
 015                return;
 16
 017            CommonScriptableObjects.featureKeyTriggersBlocked.Set(true);
 018            if (tutorialController.currentPath == TutorialController.TutorialPath.FromGenesisPlaza)
 19            {
 020                tutorialController.ShowTeacher3DModel(true);
 021                tutorialController.SetTeacherPosition(teacherPositionRef.position);
 022                if (tutorialController.configuration.teacher != null &&
 23                    tutorialController.configuration.teacher.IsHiddenByAnimation)
 024                    tutorialController.configuration.teacher.PlayAnimation(TutorialTeacher.TeacherAnimation.Reset);
 25            }
 26            else
 27            {
 028                tutorialController.hudController?.taskbarHud?.SetVisibility(false);
 029                tutorialController.ShowTeacher3DModel(false);
 030                OnShowAnimationFinished += SetupAlicePosition;
 31            }
 032        }
 33
 34        private void SetupAlicePosition()
 35        {
 036            if (tutorialController != null)
 37            {
 038                tutorialController.SetTeacherPosition(teacherPositionRef.position, false);
 039                tutorialController.ShowTeacher3DModel(true);
 040                tutorialController.configuration?.teacher?.PlayAnimation(TutorialTeacher.TeacherAnimation.Reset);
 41            }
 042            OnShowAnimationFinished -= SetupAlicePosition;
 043        }
 44
 045        public override IEnumerator OnStepExecute() { yield return new WaitUntil(() => mouseCatcher == null || mouseCatc
 46    }
 47}