A 2D Farming RPG
This is just a simple 2D farming RPG game
Loading...
Searching...
No Matches
TimeManager Class Reference

A singleton manager class for time managements. More...

Inheritance diagram for TimeManager:
Inheritance graph
Collaboration diagram for TimeManager:
Collaboration graph

Public Member Functions

void TestAdvanceGameMinute ()
 TODO: Remove before final product. More...
 
void TestAdvanceGameDay ()
 TODO: Remove before final product. More...
 

Private Member Functions

void Start ()
 Call minute event More...
 
void Update ()
 Start the ticking More...
 
void GameTick ()
 Convert delta time to ingame seconds. More...
 
void UpdateGameSecond ()
 Handles the progression of time. More...
 
string GetDayOfWeek ()
 Return the day of the week More...
 

Private Attributes

int m_GameYear = 1
 
Season m_GameSeason = Season.Spring
 
int m_GameDay = 1
 
int m_GameHour = 6
 
int m_GameMinute = 30
 
int m_GameSecond = 0
 
string m_GameDayOfWeek = "Mon"
 
bool m_IsGameClockPaused = false
 Check the game paused or not. More...
 
float m_GameTick = 0f
 

Additional Inherited Members

- Protected Member Functions inherited from SingletonMonobehaviour< TimeManager >
virtual void Awake ()
 
- Properties inherited from SingletonMonobehaviour< TimeManager >
static T Instance [get]
 

Detailed Description

A singleton manager class for time managements.

Definition at line 8 of file TimeManager.cs.

Member Function Documentation

◆ GameTick()

void TimeManager.GameTick ( )
inlineprivate

Convert delta time to ingame seconds.

Definition at line 45 of file TimeManager.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDayOfWeek()

string TimeManager.GetDayOfWeek ( )
inlineprivate

Return the day of the week

Returns
(String) dayOfWeek

Definition at line 122 of file TimeManager.cs.

Here is the caller graph for this function:

◆ Start()

void TimeManager.Start ( )
inlineprivate

Call minute event

Definition at line 26 of file TimeManager.cs.

Here is the call graph for this function:

◆ TestAdvanceGameDay()

void TimeManager.TestAdvanceGameDay ( )
inline

TODO: Remove before final product.

Advance 1 game day

Definition at line 171 of file TimeManager.cs.

Here is the call graph for this function:

◆ TestAdvanceGameMinute()

void TimeManager.TestAdvanceGameMinute ( )
inline

TODO: Remove before final product.

Advance 1 game minute

Definition at line 159 of file TimeManager.cs.

Here is the call graph for this function:

◆ Update()

void TimeManager.Update ( )
inlineprivate

Start the ticking

Definition at line 34 of file TimeManager.cs.

Here is the call graph for this function:

◆ UpdateGameSecond()

void TimeManager.UpdateGameSecond ( )
inlineprivate

Handles the progression of time.

Definition at line 59 of file TimeManager.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ m_GameDay

int TimeManager.m_GameDay = 1
private

Definition at line 12 of file TimeManager.cs.

◆ m_GameDayOfWeek

string TimeManager.m_GameDayOfWeek = "Mon"
private

Definition at line 16 of file TimeManager.cs.

◆ m_GameHour

int TimeManager.m_GameHour = 6
private

Definition at line 13 of file TimeManager.cs.

◆ m_GameMinute

int TimeManager.m_GameMinute = 30
private

Definition at line 14 of file TimeManager.cs.

◆ m_GameSeason

Season TimeManager.m_GameSeason = Season.Spring
private

Definition at line 11 of file TimeManager.cs.

◆ m_GameSecond

int TimeManager.m_GameSecond = 0
private

Definition at line 15 of file TimeManager.cs.

◆ m_GameTick

float TimeManager.m_GameTick = 0f
private

Definition at line 21 of file TimeManager.cs.

◆ m_GameYear

int TimeManager.m_GameYear = 1
private

Definition at line 10 of file TimeManager.cs.

◆ m_IsGameClockPaused

bool TimeManager.m_IsGameClockPaused = false
private

Check the game paused or not.

Definition at line 19 of file TimeManager.cs.


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