Class GameFeature<T>
A constant setting of a SlugBaseCharacter's save slot.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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
GameFeature(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 |
---|---|---|
System.String | id | The JSON key. |
System.Func<JsonAny, T> | factory | A delegate that parses JsonAny into |
Methods
TryGet(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 |
---|---|
System.Boolean |
|