< Summary

Class:FixedHierarchical
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Hierarchical/FixedHierarchical.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:24
Line coverage:0% (0 of 13)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:12
Method coverage:0% (0 of 12)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
FixedHierarchical()0%2100%
FixedHierarchical(...)0%2100%
FixedHierarchical(...)0%2100%
FixedHierarchical(...)0%2100%

File(s)

/github/workspace/Assets/Scripts/Hierarchical/FixedHierarchical.cs

#LineLine coverage
 1using UnityEngine;
 2
 3// The fixed hierarchical object represents a hierarchical object with a fixed position, velocity,
 4// and acceleration and should primarily be used for testing.
 5public class FixedHierarchical : HierarchicalBase, IHierarchical {
 6  // Shadowing is necessary because the parent's position, velocity, and acceleration are not
 7  // settable. The speed must be shadowed to prevent using the parent's velocity property.
 08  public new Vector3 Position { get; set; }
 09  public new Vector3 Velocity { get; set; }
 010  public new float Speed => Velocity.magnitude;
 011  public new Vector3 Acceleration { get; set; }
 012  public override bool IsTerminated => false;
 13
 014  public FixedHierarchical() : this(position: Vector3.zero) {}
 15  public FixedHierarchical(in Vector3 position)
 016      : this(position: position, velocity: Vector3.zero) {}
 17  public FixedHierarchical(in Vector3 position, in Vector3 velocity)
 018      : this(position: position, velocity: velocity, acceleration: Vector3.zero) {}
 019  public FixedHierarchical(in Vector3 position, in Vector3 velocity, in Vector3 acceleration) {
 020    Position = position;
 021    Velocity = velocity;
 022    Acceleration = acceleration;
 023  }
 24}