MeatMotion

UniRxMotionExtensions

Observe a builder’s tween values through UniRx or write tween values into a ReactiveProperty.

Namespace
MeatMotion
Assembly
MeatMotion.Integrations.UniRx

Jump to members

public static class UniRxMotionExtensions

Requires com.neuecc.unirx

UniRxMotionExtensions.cs · L6

Members

ToObservable

Bind the builder and expose its values as a stream. Both motion completion and cancellation finish the stream.

public static IObservable<float> ToObservable(this FloatMotionBuilder builder)
Parameters and return value
builder
this FloatMotionBuilder Configured builder, passed as the receiver for extension calls.
Returns
IObservable<float>
public static IObservable<TValue> ToObservable<TValue, TOptions, TAdapter>(this MotionBuilder<TValue, TOptions, TAdapter> builder)
    where TValue : unmanaged
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>
Parameters and return value
builder
this MotionBuilder<TValue, TOptions, TAdapter> Configured builder, passed as the receiver for extension calls.
Returns
IObservable<TValue>

BindToReactiveProperty

Write each interpolated value into the supplied ReactiveProperty.

public static MotionHandle BindToReactiveProperty(this FloatMotionBuilder builder, ReactiveProperty<float> reactiveProperty)
Parameters and return value
builder
this FloatMotionBuilder Configured builder, passed as the receiver for extension calls.
reactiveProperty
ReactiveProperty<float> Reactive property that receives each sampled value.
Returns
MotionHandle
public static MotionHandle BindToReactiveProperty<TValue, TOptions, TAdapter>(this MotionBuilder<TValue, TOptions, TAdapter> builder, ReactiveProperty<TValue> reactiveProperty)
    where TValue : unmanaged
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>
Parameters and return value
builder
this MotionBuilder<TValue, TOptions, TAdapter> Configured builder, passed as the receiver for extension calls.
reactiveProperty
ReactiveProperty<TValue> Reactive property that receives each sampled value.
Returns
MotionHandle