Interface IAction
An IAction in IdleKit contains the following properties:
- an IAction does not alter saved data, use an IStateAction if saved data is going to be altered
- an IAction perform no direct operations
- an IAction can contain optional parameters such as the caller
- an IAction is only dispatched once, and is fire and forget
Any object can fire and receive any IAction as long as they Subscribe<T>(Action<T>, Int32) to it.
Any IActions that affect the player's persistent data directly should instead be an IStateAction. This is to allow for the possibility of sending the calls to a remote server for validation.
Namespace: IdleKit.Framework
Assembly: cs.temp.dll.dll
Syntax
public interface IAction
Properties
typesToDispatchAs
This IAction will be dispatched as the types of IAction from the array. If a listener is listening to a type of IAction from this array, the listener would be notified when this IAction dispatches.
Declaration
Type[] typesToDispatchAs { get; }
Property Value
Type | Description |
---|---|
Type[] |
Methods
ResetAction()
This method will reset the cached objects in the IAction we would like to reuse the IAction and we do not want to create new instance every time an IAction is dispatched.
Declaration
void ResetAction()