Interface IUnturnedUIEffectsKeysProvider
Service that generates UI effect keys for components and prevents possible key conflicts.
Namespace: OpenMod.Unturned.Effects
Assembly: OpenMod.Unturned.dll
Syntax
public interface IUnturnedUIEffectsKeysProvider
Methods
| Improve this Doc View SourceBindKey(IOpenModComponent)
Generates a unique UI key for the component.
Declaration
UnturnedUIEffectKey BindKey(IOpenModComponent component)
Parameters
| Type | Name | Description |
|---|---|---|
| IOpenModComponent | component | component that requests the key |
Returns
| Type | Description |
|---|---|
| UnturnedUIEffectKey | unique UI effect key, or Invalid if no keys are available |
BindKeys(IOpenModComponent, Int32)
Generates a set of unique UI keys for the component.
Declaration
IEnumerable<UnturnedUIEffectKey> BindKeys(IOpenModComponent component, int amount)
Parameters
| Type | Name | Description |
|---|---|---|
| IOpenModComponent | component | component that requests the keys |
| System.Int32 | amount | amount of keys generated |
Returns
| Type | Description |
|---|---|
| IEnumerable<UnturnedUIEffectKey> | set of unique UI effect keys, or Invalid if no keys available |
ReleaseAllKeys(IOpenModComponent)
Manually releases all component bound keys to the pool of available keys.
Declaration
void ReleaseAllKeys(IOpenModComponent component)
Parameters
| Type | Name | Description |
|---|---|---|
| IOpenModComponent | component | component that requests the key release |
ReleaseKey(IOpenModComponent, UnturnedUIEffectKey)
Manually releases a component bound key to the pool of available keys.
Declaration
bool ReleaseKey(IOpenModComponent component, UnturnedUIEffectKey key)
Parameters
| Type | Name | Description |
|---|---|---|
| IOpenModComponent | component | component that requests the key release |
| UnturnedUIEffectKey | key | key to be released |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the key was released, false if the key wasn't bound |