< Summary

Class:DCL.Components.OnPointerUp
Assembly:MainScripts
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/UUIDComponent/OnPointerUp.cs
Covered lines:10
Uncovered lines:2
Coverable lines:12
Total lines:35
Line coverage:83.3% (10 of 12)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Report(...)0%6.046090%
GetClassId()0%2100%
GetEventType()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/UUIDComponent/OnPointerUp.cs

#LineLine coverage
 1using DCL.Interface;
 2using DCL.Helpers;
 3using DCL.Models;
 4using Ray = UnityEngine.Ray;
 5
 6namespace DCL.Components
 7{
 8    public class OnPointerUp : OnPointerEvent
 9    {
 10        public const string NAME = "pointerUp";
 11
 12        public override void Report(WebInterface.ACTION_BUTTON buttonId, Ray ray, HitInfo hit)
 13        {
 314            if (!enabled || !IsVisible())
 115                return;
 16
 217            Model pointerEventModel = this.model as Model;
 18
 219            if (pointerEventModel == null)
 020                return;
 21
 222            bool validButton = pointerEventModel.button == "ANY" || buttonId.ToString() == pointerEventModel.button;
 23
 224            if (IsAtHoverDistance(hit.distance) && validButton)
 25            {
 226                string meshName = pointerEventHandler.GetMeshName(hit.collider);
 227                WebInterface.ReportOnPointerUpEvent(buttonId, scene.sceneData.id, pointerEventModel.uuid, entity.entityI
 28            }
 229        }
 30
 031        public override int GetClassId() { return (int) CLASS_ID_COMPONENT.UUID_ON_UP; }
 32
 933        public override PointerInputEventType GetEventType() { return PointerInputEventType.UP; }
 34    }
 35}