C# Class PGCGame.Screens.LoadingScreen

A general-purpose async task loading screen.
Inheritance: PGCGame.CoreTypes.BaseScreen
Show file Open project: GreatMindsRobotics/PGCGame Class Usage Examples

Public Properties

Property Type Description
MinimumTime System.TimeSpan
UserCallback PGCGame.CoreTypes.Delegates.AsyncHandlerMethod
UserCallbackStartsTask bool

Public Methods

Method Description
FinishTask ( ) : void

Mark the task as finished.

InitScreen ( ScreenType screenName ) : void
LoadingScreen ( SpriteBatch sb, Color bgColor ) : System
Reset ( ) : void

Reset all fields and events.

Update ( GameTime game ) : void
loadingText_TextChanged ( object sender, EventArgs e ) : void

Private Methods

Method Description
AsyncCallBackMethod ( IAsyncResult result ) : void
RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void

Method Details

FinishTask() public method

Mark the task as finished.
public FinishTask ( ) : void
return void

InitScreen() public method

public InitScreen ( ScreenType screenName ) : void
screenName ScreenType
return void

LoadingScreen() public method

public LoadingScreen ( SpriteBatch sb, Color bgColor ) : System
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
bgColor Color
return System

Reset() public method

Reset all fields and events.
public Reset ( ) : void
return void

Update() public method

public Update ( GameTime game ) : void
game GameTime
return void

loadingText_TextChanged() public method

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

Property Details

MinimumTime public property

public TimeSpan,System MinimumTime
return System.TimeSpan

UserCallback public property

The callback that the user provides to run after the asynchronous operation.
public PGCGame.CoreTypes.Delegates.AsyncHandlerMethod UserCallback
return PGCGame.CoreTypes.Delegates.AsyncHandlerMethod

UserCallbackStartsTask public property

A boolean indicating whether the user callback starts asynchronous work.
public bool UserCallbackStartsTask
return bool