Skip to content
EvilEngine.Api.Selection

ISelection interface

public interface ISelection

One player’s weapon selection, or everyone’s (ISelections): the layers over it.

Layers stay until cleared and reach the player as soon as they change. Set throws ArgumentException naming what’s wrong when a layer has no source or a slot count outside 1 to 10.

selection.Set(new SelectionLayer("ctf:intro") { Locked = true });
selection.Clear("ctf:intro");
Assembly
EvilEngine.Api
Commit
4ff877b1

Members

Layers property

IReadOnlyList<SelectionLayer> Layers { get; }

The layers set on this selection, in the order they were set. What the player gets stacks them by priority over everyone’s.

Set method

void Set(SelectionLayer layer)

Sets a SelectionLayer, replacing the one with the same Source. Setting one equal to what’s there sends nothing.

Clear method

bool Clear(string source)

Drops the layer with that source. Returns false when there was none.