Ctrl+K

IGameLauncher

Declaration

public interface Strawberry.IGameLauncher

Provides mechanism for launching a game in different platforms. Methods implemented by using this interface are called by the Game class and you cannot run a game by implementing this interface alone

Properties

GraphicsContext abstract

Gets the nderlining GraphicsContext by which the rendering is handled.

IGraphicsContext GraphicsContext { get }

InputManager abstract

Gets the object that handles platform specific input.

IInputManager InputManager { get }

SoundManager abstract

Gets the platform specific object responsible for playing and managing sounds.

ISoundManager SoundManager { get }

Storage abstract

Gets the platform specific object responsible for retrieving data from a storage device (e.g. file system).

IStorage Storage { get }

Methods

Initialize abstract

Starts the initialization process. By default this is called by the game class, do not call it!

void Initialize(int width, int height)

Parameters:

Name Type Description
width System.Int32 width of the window or rendering target
height System.Int32 height of the window or rendering target

Run abstract

Runs the game. By default this is called by the game class, do not call it!

void Run()

Events

Initialized abstract

Occurs when the platform independent initializations (opening window, etc.) is finished.

event Action Initialized

GameLoop abstract

Occurs every step of the game. It is not a fixed step. fixed steps are handled by the game class. This should happen as fast as possible.

event Action GameLoop