MotionBuilderExtensions
値型の状態を渡すBind、整数の丸め、文字列のスクランブル、Punch・Shakeの振動設定を追加します。
public static partial class MotionBuilderExtensionsStringMotion.cs · L50メンバー
- WithRichText
- WithScrambleChars
- WithRandomSeed
- WithFrequency
- WithDampingRatio
- WithShakeMode
- Bind
- WithRoundingMode
WithRichText
文字列補間でリッチテキストのタグを考慮するか指定します。
public static MotionBuilder<TValue, StringOptions, TAdapter> WithRichText<TValue, TAdapter>( this MotionBuilder<TValue, StringOptions, TAdapter> builder, bool richTextEnabled = true)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, StringOptions>引数と戻り値
builderthis MotionBuilder<TValue, StringOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。richTextEnabled = truebool文字列の補間でリッチテキストを考慮するか。- 戻り値
MotionBuilder<TValue, StringOptions, TAdapter>
WithScrambleChars
未表示部分を埋める文字集合またはカスタム文字列を設定します。
public static MotionBuilder<TValue, StringOptions, TAdapter> WithScrambleChars<TValue, TAdapter>( this MotionBuilder<TValue, StringOptions, TAdapter> builder, ScrambleMode scrambleMode)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, StringOptions>引数と戻り値
builderthis MotionBuilder<TValue, StringOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。scrambleModeScrambleMode未表示の文字を埋める文字集合。- 戻り値
MotionBuilder<TValue, StringOptions, TAdapter>
public static MotionBuilder<TValue, StringOptions, TAdapter> WithScrambleChars<TValue, TAdapter>( this MotionBuilder<TValue, StringOptions, TAdapter> builder, FixedString64Bytes customScrambleChars)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, StringOptions>引数と戻り値
builderthis MotionBuilder<TValue, StringOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。customScrambleCharsFixedString64Bytes未表示の文字を埋める文字集合。- 戻り値
MotionBuilder<TValue, StringOptions, TAdapter>
WithRandomSeed
スクランブルやShakeで使う乱数シードを設定します。
public static MotionBuilder<TValue, StringOptions, TAdapter> WithRandomSeed<TValue, TAdapter>( this MotionBuilder<TValue, StringOptions, TAdapter> builder, uint seed)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, StringOptions>引数と戻り値
builderthis MotionBuilder<TValue, StringOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。seeduint疑似乱数のシード。- 戻り値
MotionBuilder<TValue, StringOptions, TAdapter>
public static MotionBuilder<TValue, ShakeOptions, TAdapter> WithRandomSeed<TValue, TAdapter>( this MotionBuilder<TValue, ShakeOptions, TAdapter> builder, uint seed)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, ShakeOptions>引数と戻り値
builderthis MotionBuilder<TValue, ShakeOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。seeduint疑似乱数のシード。- 戻り値
MotionBuilder<TValue, ShakeOptions, TAdapter>
WithFrequency
Punch・Shakeの振動の細かさを指定します。
public static MotionBuilder<TValue, PunchOptions, TAdapter> WithFrequency<TValue, TAdapter>( this MotionBuilder<TValue, PunchOptions, TAdapter> builder, int frequency)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, PunchOptions>引数と戻り値
builderthis MotionBuilder<TValue, PunchOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。frequencyint振動の周波数設定。- 戻り値
MotionBuilder<TValue, PunchOptions, TAdapter>
public static MotionBuilder<TValue, ShakeOptions, TAdapter> WithFrequency<TValue, TAdapter>( this MotionBuilder<TValue, ShakeOptions, TAdapter> builder, int frequency)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, ShakeOptions>引数と戻り値
builderthis MotionBuilder<TValue, ShakeOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。frequencyint振動の周波数設定。- 戻り値
MotionBuilder<TValue, ShakeOptions, TAdapter>
WithDampingRatio
Punch・Shakeの振幅を時間とともに減衰させる比率を指定します。
public static MotionBuilder<TValue, PunchOptions, TAdapter> WithDampingRatio<TValue, TAdapter>( this MotionBuilder<TValue, PunchOptions, TAdapter> builder, float dampingRatio)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, PunchOptions>引数と戻り値
builderthis MotionBuilder<TValue, PunchOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。dampingRatiofloat振動の減衰設定。- 戻り値
MotionBuilder<TValue, PunchOptions, TAdapter>
public static MotionBuilder<TValue, ShakeOptions, TAdapter> WithDampingRatio<TValue, TAdapter>( this MotionBuilder<TValue, ShakeOptions, TAdapter> builder, float dampingRatio)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, ShakeOptions>引数と戻り値
builderthis MotionBuilder<TValue, ShakeOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。dampingRatiofloat振動の減衰設定。- 戻り値
MotionBuilder<TValue, ShakeOptions, TAdapter>
WithShakeMode
揺れの計算方式をRandomとPerlinNoiseから選びます。
public static MotionBuilder<TValue, ShakeOptions, TAdapter> WithShakeMode<TValue, TAdapter>( this MotionBuilder<TValue, ShakeOptions, TAdapter> builder, ShakeMode shakeMode)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, ShakeOptions>引数と戻り値
builderthis MotionBuilder<TValue, ShakeOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。shakeModeShakeMode揺れの計算に使うノイズ方式。- 戻り値
MotionBuilder<TValue, ShakeOptions, TAdapter>
Bind
構造体の状態をsetterに渡します。setterには補間値と状態がこの順で渡されます。
public static MotionHandle Bind<TState>(this FloatMotionBuilder builder, TState state, Action<float, TState> action)
where TState : struct引数と戻り値
builderthis FloatMotionBuilder設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。stateTStatesetterの呼び出し時に補間値に続けて渡す状態。actionAction<float, TState>補間した値を受け取る処理。- 戻り値
MotionHandle
public static MotionHandle Bind<TValue, TOptions, TAdapter, TState>( this MotionBuilder<TValue, TOptions, TAdapter> builder, TState state, Action<TValue, TState> action)
where TValue : unmanaged
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>
where TState : struct引数と戻り値
builderthis MotionBuilder<TValue, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。stateTStatesetterの呼び出し時に補間値に続けて渡す状態。actionAction<TValue, TState>補間した値を受け取る処理。- 戻り値
MotionHandle
WithRoundingMode
intまたはlongの補間値を整数に変換するときの丸め規則を選びます。
public static MotionBuilder<TValue, IntegerOptions, TAdapter> WithRoundingMode<TValue, TAdapter>( this MotionBuilder<TValue, IntegerOptions, TAdapter> builder, RoundingMode roundingMode)
where TValue : unmanaged
where TAdapter : unmanaged, IMotionAdapter<TValue, IntegerOptions>引数と戻り値
builderthis MotionBuilder<TValue, IntegerOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。roundingModeRoundingMode整数補間の丸め規則。- 戻り値
MotionBuilder<TValue, IntegerOptions, TAdapter>
MeatMotion