Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/CelestialBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ public class CelestialBody /*: MonoBehaviour, ITargetable, IDiscoverable*/
public double rotationPeriod;
public CelestialBodyScienceParams scienceValues;
/// <summary>
/// Average duration in seconds between two successive "local apparent noons" (= time at which the sun is straight
/// overhead a geostationary observer). For Kerbin, this value is lightly greater than "rotationPeriod". Used to
/// perform correct Kerbin calendar calculations where the sun raises always at the same "time".
/// </summary>
public double solarDayLength;
/// <summary>
/// Wheter this celestial body has a valid solar day.
/// </summary>
public bool solarRotationPeriod;
/// <summary>
/// The radius of this body's sphere of influence (measured from the center of the body), in meters.
/// </summary>
public double sphereOfInfluence;
Expand Down
33 changes: 33 additions & 0 deletions src/UTClock.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using UnityEngine;

/// <summary>
/// Controls the date/time display at the bottom center of the space center.
/// Can be retrieved with <code>UTClock utClock = GameObject.FindObjectOfType<UTClock>();</code>.
///
/// The actual text field containting the text is a private member of this behavior but
/// can be retrieved with <code>ScreenSafeTextField textField =
/// utClock.gameObject.GetComponent<ScreenSafeTextField>();</code>.
/// </summary>
[RequireComponent(typeof(ScreenSafeTextField))]
public class UTClock : MonoBehaviour
{
/// <summary>
/// Whether to include seconds in the text field (false).
/// </summary>
public bool includeSeconds;

/// <summary>
/// Whether to include hours and minutes in the text field (true).
/// </summary>
public bool includeTimeOfDay;

public double Tdawn;

/// <summary>
/// The button 'Warp to next Morning' to the right of the text field.
/// </summary>
public ScreenSafeUIButton warpToDaylight;

public UTClock();
}