< Summary

Class:UIHitMarker
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/UIHitMarker.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:29
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:4
Method coverage:0% (0 of 4)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Awake()0%6200%
SetHit()0%2100%
SetMiss()0%2100%
LateUpdate()0%2100%

File(s)

/github/workspace/Assets/Scripts/UIHitMarker.cs

#LineLine coverage
 1using UnityEngine;
 2using TMPro;
 3
 4public class UIHitMarker : MonoBehaviour {
 5  // Start is called once before the first execution of Update after the MonoBehaviour is created
 6  private TextMeshProUGUI _text;
 7
 08  void Awake() {
 09    _text = GetComponentInChildren<TextMeshProUGUI>();
 010    if (_text == null) {
 011      Debug.LogError("No TextMeshProUGUI component found in children.");
 012    }
 013  }
 14
 015  public void SetHit() {
 016    _text.text = "x";
 017    _text.color = Color.green;
 018  }
 19
 020  public void SetMiss() {
 021    _text.text = "o";
 022    _text.color = Color.red;
 023  }
 24
 25  // Update is called once per frame
 026  void LateUpdate() {
 027    transform.LookAt(Camera.main.transform);
 028  }
 29}

Methods/Properties

Awake()
SetHit()
SetMiss()
LateUpdate()