< Summary

Class:UIEventMarker
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/UI/UIEventMarker.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:27
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
SetEventHit()0%2100%
SetEventMiss()0%2100%
Awake()0%6200%
LateUpdate()0%2100%

File(s)

/github/workspace/Assets/Scripts/UI/UIEventMarker.cs

#LineLine coverage
 1using UnityEngine;
 2using TMPro;
 3
 4public class UIEventMarker : MonoBehaviour {
 5  private TextMeshProUGUI _text;
 6
 07  public void SetEventHit() {
 08    _text.text = "x";
 09    _text.color = Color.green;
 010  }
 11
 012  public void SetEventMiss() {
 013    _text.text = "o";
 014    _text.color = Color.red;
 015  }
 16
 017  private void Awake() {
 018    _text = GetComponentInChildren<TextMeshProUGUI>();
 019    if (_text == null) {
 020      Debug.LogError("No TextMeshProUGUI component found in children.");
 021    }
 022  }
 23
 024  private void LateUpdate() {
 025    transform.LookAt(Camera.main.transform);
 026  }
 27}