IMurderGame

Namespace: Murder
Assembly: Murder.dll

public abstract IMurderGame

This is the main loop of a murder game. This has the callbacks to relevant events in the game.

⭐ Properties

HasCursor

public virtual bool HasCursor { get; }

Returns
bool

Name

public abstract virtual string Name { get; }

This is the name of the game, used when creating assets and loading save data.

Returns
string

Options

public abstract virtual JsonSerializerOptions Options { get; }

Serialization options. This is generated automatically by the game based on the assets.

Returns
JsonSerializerOptions

Version

public virtual float Version { get; }

This is the version of the game, used when checking for save compatibility.

Returns
float

⭐ Methods

OnLoadingDraw(RenderContext)

public virtual bool OnLoadingDraw(RenderContext context)

Called when a scene is unavailable due to loading of assets. Only assets at GameDataManager.PreloadContent are available.

Parameters
context RenderContext

Returns
bool

CreateGamePreferences()

public virtual GamePreferences CreateGamePreferences()

Creates a custom game preferences for the game.

Returns
GamePreferences

CreateGameProfile()

public virtual GameProfile CreateGameProfile()

Creates a custom game profile for the game.

Returns
GameProfile

CreateSoundPlayer()

public virtual ISoundPlayer CreateSoundPlayer()

Creates the client custom sound player.

Returns
ISoundPlayer

CreateRenderContext(GraphicsDevice, Camera2D, RenderContextFlags)

public virtual RenderContext CreateRenderContext(GraphicsDevice graphicsDevice, Camera2D camera, RenderContextFlags settings)

Creates a custom render context for the game.

Parameters
graphicsDevice GraphicsDevice
camera Camera2D
settings RenderContextFlags

Returns
RenderContext

CreateSaveData(int)

public virtual SaveData CreateSaveData(int slot)

Creates save data for the game.

Parameters
slot int

Returns
SaveData

LoadContentAsync()

public virtual Task LoadContentAsync()

This loads all the content within the game. Called after IMurderGame.Initialize.

Returns
Task

Initialize()

public virtual void Initialize()

Called once, when the executable for the game starts and initializes.

OnDraw()

public virtual void OnDraw()

Called after each draw.

OnExit()

public virtual void OnExit()

Called once the game exits.

OnSceneTransition()

public virtual void OnSceneTransition()

Called before a scene transition.

OnUpdate()

public virtual void OnUpdate()

Called after each update.