Class Game
- Namespace
- Axolotl2D
- Assembly
- Axolotl2D.dll
Represents the base game class for Axolotl2D.
public abstract class Game : IDisposable
- Inheritance
-
Game
- Implements
- Inherited Members
Constructors
Game(IServiceProvider, int, int)
Construct a new game.
public Game(IServiceProvider serviceProvider, int maxDrawRate = 120, int maxUpdateRate = 120)
Parameters
serviceProvider
IServiceProviderService provider to relay.
maxDrawRate
intMaximum frame rate.
maxUpdateRate
intMaximum update rate.
Properties
ClearColor
Represents the clear color of the game.
public Color ClearColor { get; set; }
Property Value
CurrentFramerate
Represents the current framerate of the game.
public double CurrentFramerate { get; }
Property Value
Title
The window title.
public string Title { get; set; }
Property Value
Viewport
The current Viewport of the game.
public Vector2 Viewport { get; set; }
Property Value
Methods
Cleanup()
Event that gets called when the game attempts to clean up.
protected abstract void Cleanup()
Dispose()
Disposes the game.
public void Dispose()
~Game()
Finalizer for the game.
protected ~Game()
GetKeyboard()
Gets the keyboard input helper.
public IKeyboard? GetKeyboard()
Returns
- IKeyboard
Keyboard input helper.
GetMouse()
Gets the mouse input helper.
public IMouse? GetMouse()
Returns
- IMouse
Mouse input helper.
Events
OnDraw
Called when the game draws.
public event Game.DrawDelegate? OnDraw
Event Type
OnLoad
Called when the game loads.
public event Game.LoadDelegate? OnLoad
Event Type
OnResize
Called when the game window resizes.
public event Game.ResizeDelegate? OnResize
Event Type
OnUpdate
Called when the game updates.
public event Game.UpdateDelegate? OnUpdate