Show / Hide Table of Contents

Class Builder

Composes a game host object.

Inheritance
object
Builder
Inherited Members
object.GetType()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.Configuration
Assembly: SadConsole.dll
Syntax
public sealed class Builder

Constructors

Builder()

Declaration
public Builder()

Properties

Configs

A collection of IConfigurator objects.

Declaration
public List<IConfigurator> Configs { get; }
Property Value
Type Description
List<IConfigurator>

Methods

GetOrCreateConfig<TConfig>()

Adds or gets the specified config object from the Configs collection.

Declaration
public TConfig GetOrCreateConfig<TConfig>() where TConfig : IConfigurator, new()
Returns
Type Description
TConfig

A new instance of TConfig if it's not found in the Configs collection. If found in the collection, that instance is returned.

Type Parameters
Name Description
TConfig

The type of config object.

Run(GameHost)

Runs each config object in the Configs collection with the specified game instance.

Declaration
public void Run(GameHost game)
Parameters
Type Name Description
GameHost game

The game being created.

Extension Methods

Extensions.AddFrameRenderEvent(Builder, EventHandler<GameHost>)
Extensions.AddFrameUpdateEvent(Builder, EventHandler<GameHost>)
Extensions.ConfigureFonts(Builder, Action<FontConfig, GameHost>)
Extensions.ConfigureFonts(Builder, bool)
Extensions.ConfigureFonts(Builder, string, string[]?)
Extensions.FixOldFontName(Builder)
Extensions.IsStartingScreenFocused(Builder, bool)
Extensions.OnEnd(Builder, EventHandler<GameHost>)
Extensions.OnStart(Builder, EventHandler<GameHost>)
Extensions.SetScreenSize(Builder, int, int)
Extensions.SetSplashScreen(Builder, Func<GameHost, ScreenSurface[]>)
Extensions.SetSplashScreen<TSplashScreen>(Builder)
Extensions.SetStartingScreen(Builder, Func<GameHost, IScreenObject>)
Extensions.SetStartingScreen<TRootObject>(Builder)
Extensions.UseDefaultConsole(Builder)
ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX