< Summary

Class:ScrollbarHandleAudioHandler
Assembly:HUDCommon
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Common/Audio/HUDElements/ScrollbarHandleAudioHandler.cs
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:31
Line coverage:0% (0 of 8)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
OnPointerEnter(...)0%20400%
OnPointerDown(...)0%12300%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Common/Audio/HUDElements/ScrollbarHandleAudioHandler.cs

#LineLine coverage
 1using UnityEngine;
 2using UnityEngine.EventSystems;
 3using UnityEngine.UI;
 4
 5public class ScrollbarHandleAudioHandler : MonoBehaviour, IPointerEnterHandler, IPointerDownHandler
 6{
 7    [SerializeField]
 8    Selectable selectable;
 9
 10    public void OnPointerEnter(PointerEventData eventData)
 11    {
 012        if (selectable != null && !Input.GetMouseButton(0))
 13        {
 014            if (selectable.interactable)
 15            {
 016                AudioScriptableObjects.buttonHover.Play(true);
 17            }
 18        }
 019    }
 20
 21    public void OnPointerDown(PointerEventData eventData)
 22    {
 023        if (selectable != null)
 24        {
 025            if (selectable.interactable)
 26            {
 027                AudioScriptableObjects.buttonClick.Play(true);
 28            }
 29        }
 030    }
 31}