Show / Hide Table of Contents

Class Event

Bind closures to in-game events.

Inheritance
System.Object
Event
Namespace: Mannequin.Bindings
Assembly: Collapse.dll
Syntax
public static class Event : object

Methods

Cancel(EventListener)

Cancel a bound EventListener.

Declaration
public static void Cancel(EventListener listener)
Parameters
Type Name Description
EventListener listener

The listener to cancel

Emit(String, Object[])

Emit an event, sending a notification to all bound EventListeners.

Declaration
public static bool Emit(string forEvent, params object[] args)
Parameters
Type Name Description
System.String forEvent

The event to fire

System.Object[] args

Arguments to send

Returns
Type Description
System.Boolean

Whether this event was cancelled by a callback returning False

On(String, Closure)

Bind a callback to an event.

Declaration
public static EventListener On(string forEvent, Closure callback)
Parameters
Type Name Description
System.String forEvent

The event to bind to

Closure callback

What will be called when the event fires

Returns
Type Description
EventListener

An EventListener for this event

Once(String, Closure)

Bind a callback to an event. Will only be executed the first time the event fires after it is bound.

Declaration
public static EventListener Once(string forEvent, Closure callback)
Parameters
Type Name Description
System.String forEvent

The event to bind to

Closure callback

What will be called when this event fires

Returns
Type Description
EventListener

An EventListener for this event

Back to top © 2020 Anarkis Gaming. All rights reserved. Generated by DocFX