< Summary

Class:SensorBase
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Sensors/SensorBase.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:20
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0
Covered methods:3
Total methods:3
Method coverage:100% (3 of 3)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SensorBase(...)0%110100%

File(s)

/github/workspace/Assets/Scripts/Sensors/SensorBase.cs

#LineLine coverage
 1using UnityEngine;
 2
 3// Base implementation of a sensor.
 4public abstract class SensorBase : ISensor {
 5  // Agent to which this sensor belongs.
 246  public IAgent Agent { get; init; }
 7
 368  public SensorBase(IAgent agent) {
 189    Agent = agent;
 1810  }
 11
 12  // Sense the target hierarchical object.
 13  public abstract SensorOutput Sense(IHierarchical hierarchical);
 14
 15  // Sense the target hierarchical object.
 16  public abstract SensorOutput Sense(IAgent agent);
 17
 18  // Sense the waypoint.
 19  public abstract SensorOutput Sense(in Vector3 waypoint);
 20}