Colossal.Atmosphere.MoonCoords
Assembly: Assembly-CSharp
Namespace: Colossal.Atmosphere
Type: struct
Base: System.ValueType
Summary:
Represents the position of the Moon for the game's atmosphere/celestial calculations. The struct contains an equatorial coordinate (likely representing right ascension and declination) together with a scalar distance from the observer/planet. The source does not document units—treat distance as using the game's internal units (commonly meters or game-specific distance units) and consult surrounding code that consumes MoonCoords to confirm exact interpretation.
Fields
-
public EquatorialCoordinate equatorialCoords
Holds the Moon's equatorial coordinate. This value typically encodes angular coordinates such as right ascension and declination (or equivalent fields) used to position the Moon on the sky dome. See the EquatorialCoordinate type for the exact components. -
public double distance
The distance from the observer/planet to the Moon. The source does not specify units; in most Unity/Colossal implementations this will be in the game's length units (check callers to be sure). Use this value when computing scale, parallax, or to convert into world-space position.
Properties
- This struct does not declare any C# properties. It exposes two public fields instead.
Constructors
- The struct has the implicit default parameterless constructor provided by C# (initializes numeric fields to 0 and value-type fields to their default).
If you need a convenience constructor, create one in a wrapper or extension in your mod code.
Methods
- None declared on this struct.
Usage Example
// Create and initialize a MoonCoords instance.
// Note: Adjust equatorial coordinate construction according to the actual EquatorialCoordinate API.
var moon = new Colossal.Atmosphere.MoonCoords();
// Example: if EquatorialCoordinate is a struct with rightAscension and declination fields:
// moon.equatorialCoords = new EquatorialCoordinate { rightAscension = 1.234, declination = 0.567 };
// Assign a distance (units depend on game's internal convention)
moon.distance = 384400.0; // illustrative value; confirm units in-game (this number is ~km in real life)
// Use moon in whatever atmospheric/celestial computation consumes MoonCoords:
SomeAtmosphereSystem.UpdateMoon(moon);
Notes: - Check the definition of EquatorialCoordinate and any consumers of MoonCoords to confirm the exact meanings and units of its members before using in precision-sensitive code.