< Summary

Class:Hand_Handler
Assembly:Test
File(s):E:/Unity/Unity Project/VR-Adventure/Assets/Scripts/Hand_Handler.cs
Covered lines:9
Uncovered lines:4
Coverable lines:13
Total lines:32
Line coverage:69.2% (9 of 13)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:2
Method coverage:100% (2 of 2)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Hand_Handler()0%000100%
Update()0%00050%

File(s)

E:/Unity/Unity Project/VR-Adventure/Assets/Scripts/Hand_Handler.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4using UnityEngine.XR.Interaction.Toolkit;
 5
 6public class Hand_Handler : MonoBehaviour
 7{
 8    [SerializeField]
 49    private ActionBasedController m_Controller = null;
 10    [SerializeField]
 411    private Animator m_Animator = null;
 12    [SerializeField]
 413    private float m_Speed = 8.0f;
 14
 15    private const string ANIMATOR_GRIP_PARAM = "Grip";
 16
 417    private float m_GripTarget = 0.0f;
 418    private float m_CurGrip = 0.0f;
 19
 20
 21    // Update is called once per frame
 22    void Update()
 724223    {
 724224        m_GripTarget = m_Controller.selectAction.action.ReadValue<float>();
 25
 724226        if (m_CurGrip != m_GripTarget)
 027        {
 028            m_CurGrip = Mathf.MoveTowards(m_CurGrip, m_GripTarget, Time.deltaTime * m_Speed);
 029            m_Animator.SetFloat(ANIMATOR_GRIP_PARAM, m_CurGrip);
 030        }
 724231    }
 32}

Methods/Properties

Hand_Handler()
Update()