Class ModEvents
Allows registering behaviour for custom events using the RegisterCallback method.
Namespace: Modding
Assembly: Assembly-CSharp.dll
Syntax
public static class ModEvents
Methods
RegisterCallback(Int32, ModEvents.OnEventExecute)
Register an OnEventExecute
callback for your event.
The callback will be called every time an instance of your event is activated by the logic system.
MP: The callback is only called on the instance simulating (i.e. the server in global sim, the simulating client in local sim).
Declaration
public static void RegisterCallback(int id, ModEvents.OnEventExecute callback)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | ID of your event, as defined in the XML declaration. |
ModEvents.OnEventExecute | callback | Callback to register. |