< 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
Awake()0%6200%
SetEventHit()0%2100%
SetEventMiss()0%2100%
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  void Awake() {
 08    _text = GetComponentInChildren<TextMeshProUGUI>();
 09    if (_text == null) {
 010      Debug.LogError("No TextMeshProUGUI component found in children.");
 011    }
 012  }
 13
 014  public void SetEventHit() {
 015    _text.text = "x";
 016    _text.color = Color.green;
 017  }
 18
 019  public void SetEventMiss() {
 020    _text.text = "o";
 021    _text.color = Color.red;
 022  }
 23
 024  void LateUpdate() {
 025    transform.LookAt(Camera.main.transform);
 026  }
 27}