G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
FClockTime Struct Reference

Struct to refer to a 0 -> 24 hour timespan. Cannot span multiple days. More...

Public Member Functions

Functions
bool IsAfter (FClockTime Time) const
 Returns true if this time is between Time and 24:00.
int GetMinute () const
float GetSecond () const
int GetTotalSeconds () const
FString ToShortString () const
FString ToString () const
void AddSeconds (float32 SecondsToAdd)
 Adds the given amount of seconds to the clock.
float32 GetSecondsSinceMidnight () const
 Returns how many seconds have passed from midnight until this clock time.
int GetHour () const
bool IsBefore (FClockTime Time) const
 Returns true if this time is between 0:00 and Time.
bool IsBetween (FClockTime A, FClockTime B) const
 Returns true if clock time is between the two given other times. Handles midnight wraparound if A > B.
FClockTime & opAssign (FClockTime Other)
void SetHour (const int &Value)
 Struct to refer to a 0 -> 24 hour timespan. Cannot span multiple days.
void SetMinute (const int &Value)
 Struct to refer to a 0 -> 24 hour timespan. Cannot span multiple days.
void SetSecond (const float &Value)
 Struct to refer to a 0 -> 24 hour timespan. Cannot span multiple days.

Static Public Member Functions

Static Functions
static FClockTime Invalid ()
 Invalid ClockTime.
static FClockTime FromSeconds (float TotalSeconds)
 Construct a ClockTime from a total amount of seconds.

Public Attributes

Variables
int Minute
float Second
const int TotalSeconds
const float32 SecondsSinceMidnight
int Hour

Detailed Description

Struct to refer to a 0 -> 24 hour timespan. Cannot span multiple days.

Member Function Documentation

◆ AddSeconds()

void AddSeconds ( float32 SecondsToAdd)

Adds the given amount of seconds to the clock.

◆ FromSeconds()

FClockTime FromSeconds ( float TotalSeconds)
static

Construct a ClockTime from a total amount of seconds.

◆ GetHour()

int GetHour ( ) const

◆ GetMinute()

int GetMinute ( ) const

◆ GetSecond()

float GetSecond ( ) const

◆ GetSecondsSinceMidnight()

float32 GetSecondsSinceMidnight ( ) const

Returns how many seconds have passed from midnight until this clock time.

◆ GetTotalSeconds()

int GetTotalSeconds ( ) const

◆ Invalid()

FClockTime Invalid ( )
static

Invalid ClockTime.

◆ IsAfter()

bool IsAfter ( FClockTime Time) const

Returns true if this time is between Time and 24:00.

◆ IsBefore()

bool IsBefore ( FClockTime Time) const

Returns true if this time is between 0:00 and Time.

◆ IsBetween()

bool IsBetween ( FClockTime A,
FClockTime B ) const

Returns true if clock time is between the two given other times. Handles midnight wraparound if A > B.

◆ opAssign()

FClockTime & opAssign ( FClockTime Other)

◆ SetHour()

void SetHour ( const int & Value)

Struct to refer to a 0 -> 24 hour timespan. Cannot span multiple days.

◆ SetMinute()

void SetMinute ( const int & Value)

Struct to refer to a 0 -> 24 hour timespan. Cannot span multiple days.

◆ SetSecond()

void SetSecond ( const float & Value)

Struct to refer to a 0 -> 24 hour timespan. Cannot span multiple days.

◆ ToShortString()

FString ToShortString ( ) const

◆ ToString()

FString ToString ( ) const

Member Data Documentation

◆ Hour

int Hour

◆ Minute

int Minute

◆ Second

float Second

◆ SecondsSinceMidnight

const float32 SecondsSinceMidnight

◆ TotalSeconds

const int TotalSeconds