GameHostOptions
namespace Griff.Runtime;
public sealed class GameHostOptionsWhat a host hands a game it makes (NewGame): the input its window or page feeds, the sound it plays through, where it keeps its saves, whether it plays over the network and where its problems are said. Left out, each is the game’s own: fresh input, silence, saves kept in memory, the network on this machine only.
Properties
Section titled “Properties”public IAudio? Audio { get; init; }What the game’s sound plays through (a MixerAudio on the host’s mixer); silent if null.
Controls
Section titled “Controls”public IReadOnlyDictionary<string, IReadOnlyList<InputBinding>>? Controls { get; init; }The game’s input actions with their bindings, as the project’s Controls say, for a host that has no project to read them from (a simulation’s); null leaves them as the project, or the built-in ones, have them.
public InputState? Input { get; init; }The input the host feeds from its keyboard, mouse, touch and controllers; a fresh one if null.
OverNetwork
Section titled “OverNetwork”public bool OverNetwork { get; init; }Whether the game hosts and joins over the network (OverNetwork): only the player’s and the editor’s Play in its window do.
Problems
Section titled “Problems”public Action<Problem>? Problems { get; init; }Told each problem the game reports (something set up without code that can’t do its job).
SaveData
Section titled “SaveData”public SaveData? SaveData { get; init; }Where the game keeps its saves; in memory if null.
SaveVersion
Section titled “SaveVersion”public int? SaveVersion { get; init; }The game’s SaveVersion, for a host with no project to read it from; null leaves it as it is.
Tables
Section titled “Tables”public TableSet? Tables { get; init; }The tables it plays with, rather than the project’s files read afresh: the editor’s, kept across replays, or a simulation step’s.
Transport
Section titled “Transport”public INetTransport? Transport { get; init; }What the game’s network play goes over (Transport): UDP if null. A platform with its own way to reach other machines hands its own.
Methods
Section titled “Methods”Equals
Section titled “Equals”public override bool Equals(object? obj)Equals
Section titled “Equals”public bool Equals(GameHostOptions? other)GetHashCode
Section titled “GetHashCode”public override int GetHashCode()ToString
Section titled “ToString”public override string ToString()