C# Class Emotion.Platform.PlatformBase

Inheritance: IInputManager
Show file Open project: Cryru/Emotion Class Usage Examples

Public Properties

Property Type Description
OnFocusChanged Action

Protected Properties

Property Type Description
_config Configurator

Public Methods

Method Description
CreateDetectedPlatform ( Configurator engineConfig ) : PlatformBase

Detect and return the correct platform instance for the engine host.

DisplayMessageBox ( string message ) : void

Display an error message natively. Usually this means a popup will show up.

Update ( ) : bool

Update the platform. If this returns false then the platform/its window was closed. If the window is unfocused this blocks until a platform message is received.

Protected Methods

Method Description
Setup ( Configurator config ) : void

Setup the native platform and creates a window.

SetupInternal ( Configurator config ) : void

Platform setup.

UpdatePlatform ( ) : bool

Method Details

CreateDetectedPlatform() public static method

Detect and return the correct platform instance for the engine host.
public static CreateDetectedPlatform ( Configurator engineConfig ) : PlatformBase
engineConfig Configurator
return PlatformBase

DisplayMessageBox() public abstract method

Display an error message natively. Usually this means a popup will show up.
public abstract DisplayMessageBox ( string message ) : void
message string The message to display.
return void

Setup() protected method

Setup the native platform and creates a window.
protected Setup ( Configurator config ) : void
config Configurator Configuration for the platform - usually passed from the engine.
return void

SetupInternal() protected abstract method

Platform setup.
protected abstract SetupInternal ( Configurator config ) : void
config Configurator
return void

Update() public method

Update the platform. If this returns false then the platform/its window was closed. If the window is unfocused this blocks until a platform message is received.
public Update ( ) : bool
return bool

UpdatePlatform() protected abstract method

protected abstract UpdatePlatform ( ) : bool
return bool

Property Details

OnFocusChanged public property

This event is called when the window's focus changes On some platforms the window cannot be unfocused. The input parameter is the new focus state.
public Action OnFocusChanged
return Action

_config protected property

The configurator the platform was initialized with.
protected Configurator _config
return Configurator