Class GameFeature<T>
A constant setting of a SlugBaseCharacter's save slot.
Inherited Members
Namespace: SlugBase.Features
Assembly: SlugBase.dll
Syntax
public class GameFeature<T> : Feature<T>
Type Parameters
Name | Description |
---|---|
T | The type that stores this setting's information. |
Constructors
View SourceGameFeature(string, Func<JsonAny, T>)
Creates a new GameFeature<T> with the given id
.
Declaration
public GameFeature(string id, Func<JsonAny, T> factory)
Parameters
Type | Name | Description |
---|---|---|
string | id | The JSON key. |
Func<JsonAny, T> | factory | A delegate that parses JsonAny into |
Methods
View SourceTryGet(RainWorldGame, out T)
Gets the T
instance assocated with game
.
Declaration
public bool TryGet(RainWorldGame game, out T value)
Parameters
Type | Name | Description |
---|---|---|
RainWorldGame | game | A RainWorldGame instance that may belong to a SlugBaseCharacter with this Feature. |
T | value | The stored setting, or |
Returns
Type | Description |
---|---|
bool |
|