C# Class DivineRightGame.GameState

Show file Open project: Haedrian/Divine-Right

Public Properties

Property Type Description
IsRunningHeavyProcessing bool
MinuteValueChanged EventHandler
SAVEPATH string

Public Methods

Method Description
DayChanged ( object sender, EventArgs e ) : void

When the day changes we need to do some things

IncrementGameTime ( DRTimeComponent timeComponent, int value ) : void

Incremements the Game Time by an amount of minutes

LoadGame ( ) : void

Loads the game from the folder. There will only ever be one such savegame at a time.

MinuteChanged ( object sender, EventArgs e ) : void
MonthChanged ( object sender, EventArgs e ) : void
SaveFileExists ( ) : bool

Returns true if the save file exists

SaveGame ( ) : void

Saves the Game into the folder. There will only be one such savegame at a time.

Private Methods

Method Description
GameState ( ) : System

Method Details

DayChanged() public static method

When the day changes we need to do some things
public static DayChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

IncrementGameTime() public static method

Incremements the Game Time by an amount of minutes
public static IncrementGameTime ( DRTimeComponent timeComponent, int value ) : void
timeComponent DRTimeComponent
value int
return void

LoadGame() public static method

Loads the game from the folder. There will only ever be one such savegame at a time.
public static LoadGame ( ) : void
return void

MinuteChanged() public static method

public static MinuteChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

MonthChanged() public static method

public static MonthChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

SaveFileExists() public static method

Returns true if the save file exists
public static SaveFileExists ( ) : bool
return bool

SaveGame() public static method

Saves the Game into the folder. There will only be one such savegame at a time.
public static SaveGame ( ) : void
return void

Property Details

IsRunningHeavyProcessing public static property

If the game is running heavy processing we store it here, so we can ignore user updates and show him something
public static bool IsRunningHeavyProcessing
return bool

MinuteValueChanged public static property

Event fires whenever the minute changes.
public static EventHandler MinuteValueChanged
return EventHandler

SAVEPATH public static property

public static string SAVEPATH
return string