C# Class TimeTrackerController

Inheritance: MonoBehaviour
Exibir arquivo Open project: FIU-SCIS-Senior-Projects/SmartBuilding4 Class Usage Examples

Public Methods

Method Description
convertSecondsToTimeOfDayString ( int sec ) : string
getSimStartTime ( ) : int
getSimTime ( TimeFormat desiredFormat ) : string

Gets the sim time.

getTimeOfDayInSeconds ( ) : int
oneSecondPassed ( float time ) : void
pause ( ) : void

Pause this instance.

printSimTime ( TimeFormat desiredFormat ) : void

Prints the sim time.

resume ( ) : void

Resume this instance.

setSimulationStartTime ( string timeOfDay ) : void

Sets the sim start time. FORMAT = 00:00:00 AM

Private Methods

Method Description
Awake ( ) : void
Start ( ) : void
Update ( ) : void
convertSecToDayHoMinSec ( int sec ) : string

Converts the seconds to days hours minites seconds.

convertSecToHoMinSec ( int sec ) : string

Converts the seconds to hours minutes seconds.

convertSecToMinSec ( int sec ) : string

Converts the sec to minutes seconds.

convertSecToTimeOfDay ( int sec ) : string

Converts the seconds to time of day.

Method Details

convertSecondsToTimeOfDayString() public static method

public static convertSecondsToTimeOfDayString ( int sec ) : string
sec int
return string

getSimStartTime() public method

public getSimStartTime ( ) : int
return int

getSimTime() public method

Gets the sim time.
public getSimTime ( TimeFormat desiredFormat ) : string
desiredFormat TimeFormat Desired format. --- consult TimeFormat Enum
return string

getTimeOfDayInSeconds() public method

public getTimeOfDayInSeconds ( ) : int
return int

oneSecondPassed() public method

public oneSecondPassed ( float time ) : void
time float
return void

pause() public method

Pause this instance.
public pause ( ) : void
return void

printSimTime() public method

Prints the sim time.
public printSimTime ( TimeFormat desiredFormat ) : void
desiredFormat TimeFormat Desired format. --- consult TimeFormat Enum
return void

resume() public method

Resume this instance.
public resume ( ) : void
return void

setSimulationStartTime() public method

Sets the sim start time. FORMAT = 00:00:00 AM
public setSimulationStartTime ( string timeOfDay ) : void
timeOfDay string Time of day as string. //format should be .. 00:00:00 am
return void