< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using DCL.Tutorial;
 2using System.Collections;
 3using System.Collections.Generic;
 4using UnityEngine;
 5
 6public class TutorialStep_SceneObject : TutorialStep
 7{
 8    [SerializeField] AudioEvent audioEventSuccess;
 9    bool catalogItemIsSelected;
 10
 11    public override void OnStepStart()
 12    {
 013        base.OnStepStart();
 14
 015        HUDController.i.builderInWorldMainHud.OnCatalogItemSelected += SceneObjectSelected;
 016    }
 17
 18    public override void OnStepFinished()
 19    {
 020        base.OnStepFinished();
 21
 022        HUDController.i.builderInWorldMainHud.OnCatalogItemSelected -= SceneObjectSelected;
 023    }
 24
 025    void SceneObjectSelected(CatalogItem sceneObject) { catalogItemIsSelected = true; }
 26
 27    public override IEnumerator OnStepExecute()
 28    {
 029        yield return new WaitUntil(() => catalogItemIsSelected);
 030        audioEventSuccess.Play(true);
 031    }
 32}