public PlanetDesign(string designName, PlanetStat stat, IEnumerable<PassiveCountermeasureStat> passiveCmStats) : base(designName, passiveCmStats) { Stat = stat; }
private FollowableItemCameraStat MakePlanetCameraStat(PlanetStat planetStat) { float fov; PlanetoidCategory pCat = planetStat.Category; switch (pCat) { case PlanetoidCategory.GasGiant: fov = 70F; break; case PlanetoidCategory.Ice: case PlanetoidCategory.Terrestrial: fov = 65F; break; case PlanetoidCategory.Volcanic: fov = 60F; break; case PlanetoidCategory.Moon_005: case PlanetoidCategory.Moon_001: case PlanetoidCategory.Moon_002: case PlanetoidCategory.Moon_003: case PlanetoidCategory.Moon_004: case PlanetoidCategory.None: default: throw new NotImplementedException(ErrorMessages.UnanticipatedSwitchValue.Inject(pCat)); } float radius = planetStat.Radius; float minViewDistance = radius + 1F; float highOrbitRadius = planetStat.CloseOrbitInnerRadius + TempGameValues.ShipCloseOrbitSlotDepth; float optViewDistance = highOrbitRadius + 1F; return new FollowableItemCameraStat(minViewDistance, optViewDistance, fov); }
/// <summary> /// Initializes a new instance of the <see cref="PlanetData" /> class with no owner. /// </summary> /// <param name="planet">The planet.</param> /// <param name="passiveCMs">The passive Countermeasures.</param> /// <param name="planetStat">The stat.</param> public PlanetData(IPlanet planet, IEnumerable<PassiveCountermeasure> passiveCMs, PlanetStat planetStat) : this(planet, TempGameValues.NoPlayer, passiveCMs, planetStat) { }
/// <summary> /// Initializes a new instance of the <see cref="PlanetData" /> class. /// </summary> /// <param name="planet">The planet.</param> /// <param name="owner">The owner.</param> /// <param name="passiveCMs">The passive Countermeasures.</param> /// <param name="planetStat">The stat.</param> public PlanetData(IPlanet planet, Player owner, IEnumerable<PassiveCountermeasure> passiveCMs, PlanetStat planetStat) : base(planet, owner, passiveCMs, planetStat) { CloseOrbitInnerRadius = planetStat.CloseOrbitInnerRadius; }
/// <summary> /// Initializes a new instance of the <see cref="PlanetData" /> class /// with no countermeasures and no owner. /// </summary> /// <param name="planet">The planet.</param> /// <param name="planetStat">The stat.</param> public PlanetData(IPlanet planet, PlanetStat planetStat) : this(planet, TempGameValues.NoPlayer, Enumerable.Empty<PassiveCountermeasure>(), planetStat) { }