Class AdditionalUserState<T, TSelf>
A mod friendly way of adding additional state to Users.
Inheritance
System.Object
AdditionalUserState<T, TSelf>
Assembly: Eco.Gameplay.dll
Syntax
public abstract class AdditionalUserState<T, TSelf> : AutoSingleton<TSelf> where T : new()
where TSelf : AdditionalUserState<T, TSelf>
Type Parameters
Name |
Description |
T |
The type of the state to save. Must be convertable to and from a string.
|
TSelf |
Self type.
|
Constructors
AdditionalUserState()
Declaration
protected AdditionalUserState()
Properties
Key
Declaration
protected abstract string Key { get; }
Property Value
Type |
Description |
System.String |
|
OnChanged
Declaration
public ThreadSafeAction<User> OnChanged { get; }
Property Value
Methods
GetState(User)
Declaration
public T GetState(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
Returns
SetState(User, T)
Declaration
public void SetState(User user, T val)
Parameters
Type |
Name |
Description |
User |
user |
|
T |
val |
|
Extension Methods