Class ActionUtil
Utility class to help with keeping track of IGameActionAware listeners, and notifying them when actions are performed.
Used by systems like Contracts, WorkParties, Item Distributions, etc., to keep track of progress.
Inheritance
System.Object
ActionUtil
Namespace: Eco.Gameplay.GameActions
Assembly: Eco.Gameplay.dll
Syntax
public static class ActionUtil : Object
Fields
Listeners
Holds listeners that want to be notified whenever a GameAction is being performed.
Also used by AuthManager to check if auth should be overriden for a specific action because it's allowed by one (e.g. a Contract that allows usage of someone's Oven).
Declaration
public static readonly ThreadSafeList<IGameActionAware> Listeners
Field Value
Type | Description |
---|---|
ThreadSafeList<IGameActionAware> |
Methods
ActionPerformed(GameAction)
Notifies all listeners that an action was performed.
Declaration
public static void ActionPerformed(GameAction action)
Parameters
Type | Name | Description |
---|---|---|
GameAction | action |
AddListener(IGameActionAware)
Declaration
public static void AddListener(IGameActionAware listener)
Parameters
Type | Name | Description |
---|---|---|
IGameActionAware | listener |
RemoveListener(IGameActionAware)
Declaration
public static void RemoveListener(IGameActionAware listener)
Parameters
Type | Name | Description |
---|---|---|
IGameActionAware | listener |