Update method names for Game, add documentation for renderers, remove position argument from DrawSdfText and DrawDebugText in Renderer.
This commit is contained in:
@@ -3,15 +3,38 @@ namespace DaggerFramework
|
||||
public abstract class Game
|
||||
{
|
||||
public abstract string ResourceRoot { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Starts the game application.
|
||||
/// This involves initializing the required subsystems, loading resources from the disk, and then preparing the subsystems for running in the main loop.
|
||||
/// </summary>
|
||||
public void Start()
|
||||
{
|
||||
Initialize();
|
||||
LoadResources();
|
||||
OnStart();
|
||||
MainLoop();
|
||||
Ready();
|
||||
Run();
|
||||
}
|
||||
protected abstract void OnStart();
|
||||
|
||||
/// <summary>
|
||||
/// Called when it's time to initialize the subsystems.
|
||||
/// </summary>
|
||||
public abstract void Initialize();
|
||||
/// <summary>
|
||||
/// Called when it's time to load the application's resources, such as images or sounds.
|
||||
/// </summary>
|
||||
protected abstract void LoadResources();
|
||||
protected abstract void MainLoop();
|
||||
/// <summary>
|
||||
/// Called when it's safe to manipulate with the resources or/and systems.
|
||||
/// </summary>
|
||||
protected abstract void Ready();
|
||||
/// <summary>
|
||||
/// Called when everything has been readied to start the main loop.
|
||||
/// </summary>
|
||||
protected abstract void Run();
|
||||
/// <summary>
|
||||
/// Called when the application quits and it's safe to clean up.
|
||||
/// </summary>
|
||||
public abstract void Shutdown();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user