Class AsyncUpdateSource
Implementation of IAsyncUpdateSource.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: UnityFx.Async
Assembly: UnityFx.Async-netstandard2.0.dll
Syntax
public class AsyncUpdateSource : IAsyncUpdateSource, IObservable<float>, IObserver<float>, IDisposable
Methods
| Improve this Doc View SourceAddListener(Action<Single>)
Adds a new update listener.
Declaration
public void AddListener(Action<float> updateCallback)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Single> | updateCallback | An update callback. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown is |
AddListener(IAsyncUpdatable)
Adds a new update listener.
Declaration
public void AddListener(IAsyncUpdatable updatable)
Parameters
Type | Name | Description |
---|---|---|
IAsyncUpdatable | updatable | An update listener. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown is |
Dispose()
Declaration
public void Dispose()
OnCompleted()
Declaration
public void OnCompleted()
OnError(Exception)
Declaration
public void OnError(Exception e)
Parameters
Type | Name | Description |
---|---|---|
Exception | e |
OnNext(Single)
Declaration
public void OnNext(float frameTime)
Parameters
Type | Name | Description |
---|---|---|
Single | frameTime |
RemoveListener(Action<Single>)
Removes an existing listener.
Declaration
public void RemoveListener(Action<float> updateCallback)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Single> | updateCallback | An update listener. Can be null. |
RemoveListener(IAsyncUpdatable)
Removes an existing listener.
Declaration
public void RemoveListener(IAsyncUpdatable updatable)
Parameters
Type | Name | Description |
---|---|---|
IAsyncUpdatable | updatable | An update listener. Can be null. |
Subscribe(IObserver<Single>)
Declaration
public IDisposable Subscribe(IObserver<float> observer)
Parameters
Type | Name | Description |
---|---|---|
System.IObserver<Single> | observer |
Returns
Type | Description |
---|---|
IDisposable |
Implements
System.IObservable<T>
System.IObserver<T>