BlueSkies for Unity  1.8.1
BlueSkies.BlueSkiesTime Class Reference

Time system for keeping track/updating real time numbers. More...

Inheritance diagram for BlueSkies.BlueSkiesTime:
BlueSkies.IBlueSkiesTime

Public Member Functions

 BlueSkiesTime (IBlueSkiesTime time)
 
override int GetHashCode ()
 
override bool Equals (object t)
 
void addSeconds (float numSeconds)
 
double GetEpoch2000Centuries (bool terrestrialTime)
 
bool setDate (int year, int month, int day)
 
bool setTime (int hour, int minutes, double seconds, double timeZone, bool daylightSavings)
 
void getDate (out int year, out int month, out int day)
 
void getTime (out int hour, out int minute, out double seconds)
 
int getYear ()
 
int getMonth ()
 
int getDay ()
 
int getHour ()
 
int getMinute ()
 
double getSeconds ()
 
double getTimeZone ()
 
bool isDaylightSavingsTime ()
 

Static Public Member Functions

static bool operator== (BlueSkiesTime t1, BlueSkiesTime t2)
 
static bool operator!= (BlueSkiesTime t1, BlueSkiesTime t2)
 

Detailed Description

Time system for keeping track/updating real time numbers.

Constructor & Destructor Documentation

BlueSkies.BlueSkiesTime.BlueSkiesTime ( IBlueSkiesTime  time)

Constructor

Parameters
[in]timeA copy of BlueSkiesTime

Member Function Documentation

void BlueSkies.BlueSkiesTime.addSeconds ( float  numSeconds)

Add a number of seconds and update all time parameters accordingly.

Parameters
[in]numSecondsThe number of seconds to add.

Implements BlueSkies.IBlueSkiesTime.

override bool BlueSkies.BlueSkiesTime.Equals ( object  t)

Checks if objects are the same

Returns
TRUE if object is equal

Implements BlueSkies.IBlueSkiesTime.

void BlueSkies.BlueSkiesTime.getDate ( out int  year,
out int  month,
out int  day 
)

Get the current date.

Parameters
[out]yearThe current year.
[out]monthThe current month.
[out]dayThe current day.

Implements BlueSkies.IBlueSkiesTime.

int BlueSkies.BlueSkiesTime.getDay ( )

Get the current day (if needing just the day, rather than all month).

Returns
The current day.
double BlueSkies.BlueSkiesTime.GetEpoch2000Centuries ( bool  terrestrialTime)

grabs the current time for sky positioning

Returns
The Current Time as a double
Parameters
[in]terrestrialTime

Implements BlueSkies.IBlueSkiesTime.

override int BlueSkies.BlueSkiesTime.GetHashCode ( )

Grabs all the time and stores it all in an int

Returns
The total amount of time in a single int

Implements BlueSkies.IBlueSkiesTime.

int BlueSkies.BlueSkiesTime.getHour ( )

Get the current hour (if needing just the hour, rather than all time).

Returns
The current hour.

Implements BlueSkies.IBlueSkiesTime.

int BlueSkies.BlueSkiesTime.getMinute ( )

Get the current minute (if needing just the minute, rather than all time).

Returns
The current minute.

Implements BlueSkies.IBlueSkiesTime.

int BlueSkies.BlueSkiesTime.getMonth ( )

Get the current month (if needing just the month, rather than all date).

Returns
The current month.

Implements BlueSkies.IBlueSkiesTime.

double BlueSkies.BlueSkiesTime.getSeconds ( )

Get the current seconds (if needing just the seconds, rather than all time).

Returns
The current seconds.

Implements BlueSkies.IBlueSkiesTime.

void BlueSkies.BlueSkiesTime.getTime ( out int  hour,
out int  minute,
out double  seconds 
)

Get the current time.

Parameters
[out]hourThe current hour.
[out]minuteThe current minute.
[out]secondsThe current seconds.

Implements BlueSkies.IBlueSkiesTime.

double BlueSkies.BlueSkiesTime.getTimeZone ( )

Get the current time zone.

Returns
The current time zone.

Implements BlueSkies.IBlueSkiesTime.

int BlueSkies.BlueSkiesTime.getYear ( )

Get the current year (if needing just the uear, rather than all date).

Returns
The current year.

Implements BlueSkies.IBlueSkiesTime.

bool BlueSkies.BlueSkiesTime.isDaylightSavingsTime ( )

Check if daylight savings time is active.

Returns
Daylight savings time check.

Implements BlueSkies.IBlueSkiesTime.

bool BlueSkies.BlueSkiesTime.setDate ( int  year,
int  month,
int  day 
)

Set the current date.

Parameters
[in]yearThe current year.
[in]monthThe current month.
[in]dayThe current day.
Returns
True if the provided year, month, and day are valid.

Implements BlueSkies.IBlueSkiesTime.

bool BlueSkies.BlueSkiesTime.setTime ( int  hour,
int  minutes,
double  seconds,
double  timeZone,
bool  daylightSavings 
)

Set the current time.

Parameters
[in]hourThe current hour.
[in]minutesThe current minute.
[in]secondsThe current seconds.
[in]timeZoneThe current time zone.
Returns
True if the provided hour, minute, and seconds are valid.

Implements BlueSkies.IBlueSkiesTime.


The documentation for this class was generated from the following file: