< Summary

Class:TutorialStep_Catalog
Assembly:TutorialBuilderInWorld
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Tutorial/Scripts/Steps/BuilderInWorld/TutorialStep_Catalog.cs
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:38
Line coverage:0% (0 of 12)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
OnStepStart()0%2100%
OnStepFinished()0%2100%
CatalogOpened()0%2100%
OnStepExecute()0%12300%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Tutorial/Scripts/Steps/BuilderInWorld/TutorialStep_Catalog.cs

#LineLine coverage
 1using DCL.Tutorial;
 2using System.Collections;
 3using System.Collections.Generic;
 4using UnityEngine;
 5
 6public class TutorialStep_Catalog : TutorialStep
 7{
 8    public GameObject arrowGO;
 9    [SerializeField] AudioEvent audioEventSuccess;
 10    bool isCatalogOpen = false;
 11
 12    public override void OnStepStart()
 13    {
 014        base.OnStepStart();
 15
 016        HUDController.i.builderInWorldMainHud.OnCatalogOpen += CatalogOpened;
 017    }
 18
 19    public override void OnStepFinished()
 20    {
 021        base.OnStepFinished();
 22
 023        HUDController.i.builderInWorldMainHud.OnCatalogOpen -= CatalogOpened;
 024    }
 25
 26    void CatalogOpened()
 27    {
 028        isCatalogOpen = true;
 029        arrowGO.SetActive(false);
 030    }
 31
 32    public override IEnumerator OnStepExecute()
 33    {
 034        yield return new WaitUntil(() => isCatalogOpen);
 035        audioEventSuccess.Play(true);
 036    }
 37
 38}