< Summary

Class:ControlsHUDView
Assembly:ControlsHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/ControlsHUD/ControlsHUDView.cs
Covered lines:4
Uncovered lines:2
Coverable lines:6
Total lines:25
Line coverage:66.6% (4 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Awake()0%110100%
OnDestroy()0%110100%
OnCloseActionTriggered(...)0%2100%
Close(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/ControlsHUD/ControlsHUDView.cs

#LineLine coverage
 1using UnityEngine;
 2using System;
 3
 4public class ControlsHUDView : MonoBehaviour
 5{
 6    [SerializeField] internal InputAction_Trigger closeAction;
 7    [SerializeField] internal ShowHideAnimator showHideAnimator;
 8    [SerializeField] internal Button_OnPointerDown closeButton;
 9    [SerializeField] internal GameObject voiceChatButton;
 10    [SerializeField] internal GameObject builderInWorldButton;
 11
 12    public event Action<bool> onCloseActionTriggered;
 13
 14    private void Awake()
 15    {
 316        closeAction.OnTriggered += OnCloseActionTriggered;
 317        closeButton.onPointerDown += () => Close(true);
 318    }
 19
 620    private void OnDestroy() { closeAction.OnTriggered -= OnCloseActionTriggered; }
 21
 022    private void OnCloseActionTriggered(DCLAction_Trigger action) { Close(false); }
 23
 024    private void Close(bool closedByButtonPress) { onCloseActionTriggered?.Invoke(closedByButtonPress); }
 25}