Table of Contents

Class PresenterBase<TUniverse>

Namespace
AlphaFramework.Presentation
Assembly
AlphaFramework.Presentation.dll

Uses the Engine to present an IUniverse game world.

public abstract class PresenterBase<TUniverse> : IPresenter<TUniverse>, IDisposable where TUniverse : UniverseBase

Type Parameters

TUniverse

The type of universe to present.

Inheritance
PresenterBase<TUniverse>
Implements
IPresenter<TUniverse>
Derived
Inherited Members
Extension Methods

Constructors

PresenterBase(Engine, TUniverse)

Uses the Engine to present an IUniverse game world.

protected PresenterBase(Engine engine, TUniverse universe)

Parameters

engine Engine
universe TUniverse

Fields

Engine

The Engine reference to use for rendering operations

protected readonly Engine Engine

Field Value

Engine

Scene

The engine scene containing the graphical representations of Positionable<TCoordinates>s

protected readonly Scene Scene

Field Value

Scene

Properties

Initialized

Was Initialize() already called?

protected bool Initialized { get; }

Property Value

bool

SkyboxFileFormat

The file format (file ending without a dot) used to store skybox textures.

protected virtual string SkyboxFileFormat { get; }

Property Value

string

Universe

The game world to present.

[LuaHide]
public TUniverse Universe { get; }

Property Value

TUniverse

View

The engine view used to display the Scene

public View View { get; protected init; }

Property Value

View

Methods

DimDown()

Dims in the screen down.

public virtual void DimDown()

DimUp()

Dims in the screen back up.

public virtual void DimUp()

Dispose()

Removes the Universe hooks setup by Initialize() and disposes all created Views, Scenes, PositionableRenderables, etc.

public void Dispose()

Dispose(bool)

To be called by Dispose() and the object destructor.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true if called manually and not by the garbage collector.

~PresenterBase()

protected ~PresenterBase()

HookIn()

Hooks the View into Views

public virtual void HookIn()

Remarks

Will internally call Initialize() first, if you didn't

HookOut()

Hooks the View out of Views

public virtual void HookOut()

Initialize()

Generate Renderables from the Universe and keeps everything in sync using events

public virtual void Initialize()

Remarks

Should be called before HookIn() is used

Exceptions

FileNotFoundException

A required Asset file could not be found.

IOException

There was an error reading an Asset file.

InvalidDataException

An Asset file contains invalid data.