< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using System;
 2using UnityEngine;
 3
 4public abstract class Sensor : MonoBehaviour {
 5  protected Agent _agent;
 6
 157  protected virtual void Start() {
 158    _agent = GetComponent<Agent>();
 159  }
 10
 11  /// <summary>
 12  /// Main sensing method to gather information about a target agent.
 13  /// </summary>
 14  /// <param name="agent">The agent to sense.</param>
 15  /// <returns>SensorOutput containing position and velocity data.</returns>
 16  public abstract SensorOutput Sense(Agent agent);
 17
 18  /// <summary>
 19  /// Main sensing method to gather information about a waypoint.
 20  /// </summary>
 21  /// <param name="waypoint">The waypoint to sense.</param>
 22  /// <returns>SensorOutput containing position and velocity data.</returns>
 23  public abstract SensorOutput SenseWaypoint(Vector3 waypoint);
 24}
 25
 26public struct SensorOutput {
 27  public PositionTransformation position;
 28  public VelocityTransformation velocity;
 29}

Methods/Properties

Start()