Skip to content

GameApplicationBuilder.AddDefaultSystem Method

Overloads
AddDefaultSystem<T>() Adds a system to every scene's entity world, equivalent to calling world.AddSystem<T>() in ConfigureScene(Action<IEntityWorld>). Can be excluded project-wide with ExcludeDefaultSystem<T>(). Can be called multiple times; additions are additive.
AddDefaultSystem<T>(Action<T>) Adds a system to every scene's entity world with an initial configuration delegate. Can be excluded project-wide with ExcludeDefaultSystem<T>().

GameApplicationBuilder.AddDefaultSystem\<T>() Method

Adds a system to every scene's entity world, equivalent to calling world.AddSystem<T>() in ConfigureScene(Action<IEntityWorld>). Can be excluded project-wide with ExcludeDefaultSystem<T>(). Can be called multiple times; additions are additive.

public Brine2D.Hosting.GameApplicationBuilder AddDefaultSystem<T>()
    where T : class, Brine2D.ECS.ISystem;

Type parameters

T

Returns

GameApplicationBuilder

Example

builder.AddDefaultSystem<FogOfWarSystem>();

GameApplicationBuilder.AddDefaultSystem\<T>(Action\<T>) Method

Adds a system to every scene's entity world with an initial configuration delegate. Can be excluded project-wide with ExcludeDefaultSystem<T>().

public Brine2D.Hosting.GameApplicationBuilder AddDefaultSystem<T>(System.Action<T> configure)
    where T : class, Brine2D.ECS.ISystem;

Type parameters

T

Parameters

configure System.Action<T>

Returns

GameApplicationBuilder

Example

builder.AddDefaultSystem<FogOfWarSystem>(s => s.Radius = 200f);