MeatMotion

UniRxMotionExtensions

ビルダーからUniRxのObservableを作成し、Tweenの値をReactivePropertyにバインドします。

Namespace
MeatMotion
Assembly
MeatMotion.Integrations.UniRx

メンバー一覧へ

public static class UniRxMotionExtensions

使用条件 com.neuecc.unirx

UniRxMotionExtensions.cs · L6

メンバー

ToObservable

ビルダーをバインドして値を通知するストリームを返します。Tweenの完了とキャンセルのどちらでもストリームが終了します。

public static IObservable<float> ToObservable(this FloatMotionBuilder builder)
引数と戻り値
builder
this FloatMotionBuilder 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, TOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
戻り値
IObservable<TValue>

BindToReactiveProperty

補間値を登録したReactivePropertyのValueへ書き込みます。

public static MotionHandle BindToReactiveProperty(this FloatMotionBuilder builder, ReactiveProperty<float> reactiveProperty)
引数と戻り値
builder
this FloatMotionBuilder 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
reactiveProperty
ReactiveProperty<float> 補間した値を書き込むリアクティブプロパティ。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, TOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
reactiveProperty
ReactiveProperty<TValue> 補間した値を書き込むリアクティブプロパティ。
戻り値
MotionHandle