Beispiel #1
0
 public static IEnumerable <IStellarEntity> CreateMoon(
     Random random,
     MoonOrbit orbiterParams)
 {
     if (!orbiterParams.Size.HasValue)
     {
         orbiterParams.Size = new float?(StarSystemHelper.ChooseSize(random, StarSystemVars.Instance.MoonMinRadius, StarSystemVars.Instance.MoonMaxRadius));
     }
     return((IEnumerable <IStellarEntity>) new IStellarEntity[1]
     {
         (IStellarEntity) new StellarEntity()
         {
             Params = (Kerberos.Sots.Data.StarMapFramework.Orbit)orbiterParams
         }
     });
 }
Beispiel #2
0
 public static IEnumerable <IStellarEntity> CreatePlanet(
     Random random,
     PlanetOrbit orbiterParams,
     bool isOrbitingStar)
 {
     if (!orbiterParams.Size.HasValue)
     {
         orbiterParams.Size = !isOrbitingStar ? new int?(random.NextInclusive(StarSystemVars.Instance.HabitalMoonMinSize, StarSystemVars.Instance.HabitalMoonMaxSize)) : new int?((int)StarSystemHelper.ChooseSize(random, StarSystemVars.Instance.PlanetMinRadius, StarSystemVars.Instance.PlanetMaxRadius));
     }
     return((IEnumerable <IStellarEntity>) new IStellarEntity[1]
     {
         (IStellarEntity) new StellarEntity()
         {
             Params = (Kerberos.Sots.Data.StarMapFramework.Orbit)orbiterParams
         }
     });
 }