< Summary

Class:Hand_Handler
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/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)

D:/--UnityProject/VR/VRExplorer_subjects/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]
 109    private ActionBasedController m_Controller = null;
 10    [SerializeField]
 1011    private Animator m_Animator = null;
 12    [SerializeField]
 1013    private float m_Speed = 8.0f;
 14
 15    private const string ANIMATOR_GRIP_PARAM = "Grip";
 16
 1017    private float m_GripTarget = 0.0f;
 1018    private float m_CurGrip = 0.0f;
 19
 20
 21    // Update is called once per frame
 22    void Update()
 1441023    {
 1441024        m_GripTarget = m_Controller.selectAction.action.ReadValue<float>();
 25
 1441026        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        }
 1441031    }
 32}

Methods/Properties

Hand_Handler()
Update()