跳到主要内容

Class InputEvent

Properties

listenerCount

public int listenerCount { get; }

Methods

WaitInput()

public Task<T> WaitInput()

Add(Action<T> listener)

public void Add(Action<T> listener)

AddOnce(Action<T> listener)

public void AddOnce(Action<T> listener)

AddBlock(Action<T> blockingListener)

Add a blocking listener. When the blocking listener responds, the propagation of the current event is interrupted.

public void AddBlock(Action<T> blockingListener)

AddBlockOnce(Action<T> blockingListener)

Add a blocking listener (only once).

public void AddBlockOnce(Action<T> blockingListener)

AddAsyncBlock(Func<T, Task> asyncBlockingListener)

Add an asynchronous blocking listener. When the asynchronous blocking listener responds, interrupt the propagation of the current event and disable the current event until the asynchronous blocking listener completes.

public void AddAsyncBlock(Func<T, Task> asyncBlockingListener)

AddAsyncBlockingOnce(Func<T, Task> asyncBlockingListener)

Add an asynchronous blocking listener (only once).

public void AddAsyncBlockingOnce(Func<T, Task> asyncBlockingListener)

AddBlock()

Add a permanent block.

public EventBlocker AddBlock()

BlockUnilt(Task task)

Disable the current event until the task is completed.

public Task BlockUnilt(Task task)

Clear()

public void Clear()

Remove(Action<T> listener)

public void Remove(Action<T> listener)

Remove(Func<T, Task> listener)

public void Remove(Func<T, Task> listener)

RemoveBlock(EventBlocker eventBlocker)

public void RemoveBlock(EventBlocker eventBlocker)