Struct GameDateTime
Represents an in-game datetime (elapsed days and 24-hour time).
public struct GameDateTime
- Inherited Members
- Extension Methods
Constructors
GameDateTime(GameDateTime)
Constructs a GameDateTime from the internal GameDateTime struct.
public GameDateTime(GameDateTime gameDateTime)
Parameters
gameDateTimeGameDateTime
GameDateTime(GameDateTimeData)
Constructs a GameDateTime from an internal GameDateTimeData.
public GameDateTime(GameDateTimeData data)
Parameters
dataGameDateTimeData
GameDateTime(int)
Constructs a GameDateTime from total minutes.
public GameDateTime(int minSum)
Parameters
minSumint
GameDateTime(int, int)
Constructs a GameDateTime from elapsed days and 24-hour time.
public GameDateTime(int elapsedDays, int time)
Parameters
Fields
ElapsedDays
public int ElapsedDays
Field Value
Time
public int Time
Field Value
Methods
AddMinutes(int)
Returns a new GameDateTime with additional minutes added.
public GameDateTime AddMinutes(int minutes)
Parameters
minutesint
Returns
GetFormattedTime()
Returns the current time formatted as a 12-hour AM/PM string. Example: "12:30 PM"
public string GetFormattedTime()
Returns
GetMinSum()
Returns the total minute sum (days * 1440 + minutes of day).
public int GetMinSum()
Returns
IsNightTime()
Returns true if the time is considered nighttime. (Before 6AM or after 6PM)
public bool IsNightTime()
Returns
IsSameDay(GameDateTime)
Returns true if the two GameDateTimes are on the same day (ignores time).
public bool IsSameDay(GameDateTime other)
Parameters
otherGameDateTime
Returns
IsSameTime(GameDateTime)
Returns true if the two GameDateTimes are at the same day and time.
public bool IsSameTime(GameDateTime other)
Parameters
otherGameDateTime
Returns
ToS1()
Converts this wrapper to the internal GameDateTime struct.
public GameDateTime ToS1()
Returns
- GameDateTime
ToString()
String representation: "Day 3, 2:30 PM"
public override string ToString()
Returns
Operators
operator +(GameDateTime, GameDateTime)
public static GameDateTime operator +(GameDateTime a, GameDateTime b)
Parameters
Returns
operator >(GameDateTime, GameDateTime)
public static bool operator >(GameDateTime a, GameDateTime b)
Parameters
Returns
operator <(GameDateTime, GameDateTime)
public static bool operator <(GameDateTime a, GameDateTime b)
Parameters
Returns
operator -(GameDateTime, GameDateTime)
public static GameDateTime operator -(GameDateTime a, GameDateTime b)