예제 #1
0
        public void OrderAsExpected(int period1, OrbitalType type1, int period2, OrbitalType type2)
        {
            var sut      = OrbitalComparer.Instance;
            var orbital1 = new Orbital(null, period1, type1);
            var orbital2 = new Orbital(null, period2, type2);

            Assert.That(sut.Compare(orbital1, orbital2), Is.LessThan(0));
        }
예제 #2
0
 private OrbitalView GetPlanetPrefab(OrbitalType type) => OrbitalPreFabs[(int)type] ?? OrbitalPreFabs[(int)OrbitalType.Planet];
예제 #3
0
    public Vector3 GetBodySize(OrbitalType type)
    {
        var size = (OrbitalViewBodySize[(int)type] > 0) ? OrbitalViewBodySize[(int)type] : DefaultBodySize;

        return(new Vector3(size, size, size));
    }
예제 #4
0
 public Orbital(AtomWithOrbitals atom, int period, OrbitalType type)
 {
     Atom   = atom;
     Period = period;
     Type   = type;
 }