< 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:23
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
 7557  protected virtual void Start() {
 7558    _agent = GetComponent<Agent>();
 7559  }
 10
 11  /// Main sensing method to gather information about a target agent.
 12  /// Returns the sensor output containing the sensed position and velocity.
 13  public abstract SensorOutput Sense(Agent agent);
 14
 15  /// Main sensing method to gather information about a waypoint.
 16  /// Returns the sensor output containing the sensed position and velocity.
 17  public abstract SensorOutput SenseWaypoint(Vector3 waypoint);
 18}
 19
 20public struct SensorOutput {
 21  public PositionTransformation position;
 22  public VelocityTransformation velocity;
 23}

Methods/Properties

Start()