< Summary

Class:QuickBarSlot
Assembly:BuildModeHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuildModeHUD/Scripts/Common/QuickBarSlot.cs
Covered lines:11
Uncovered lines:0
Coverable lines:11
Total lines:30
Line coverage:100% (11 of 11)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SetTexture(...)0%110100%
SetEmpty()0%110100%
EnableDragMode()0%110100%
SetActive(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuildModeHUD/Scripts/Common/QuickBarSlot.cs

#LineLine coverage
 1using TMPro;
 2using UnityEngine;
 3using UnityEngine.UI;
 4
 5public class QuickBarSlot : MonoBehaviour
 6{
 7    [SerializeField] internal RawImage image;
 8    [SerializeField] internal TMP_Text text;
 9    [SerializeField] internal CanvasGroup canvasGroup;
 10
 311    public bool isEmpty => !image.enabled;
 312    public Transform slotTransform => transform;
 13
 14    public void SetTexture(Texture texture)
 15    {
 416        image.texture = texture;
 417        image.enabled = true;
 418    }
 19
 11620    public void SetEmpty() { image.enabled = false; }
 21
 22    public void EnableDragMode()
 23    {
 5624        text.enabled = false;
 5625        canvasGroup.blocksRaycasts = false;
 5626        canvasGroup.alpha = 0.6f;
 5627    }
 28
 11829    public void SetActive(bool isActive) { gameObject.SetActive(isActive); }
 30}