MeatMotion

MotionBuilderExtensions

値型の状態を渡すBind、整数の丸め、文字列のスクランブル、Punch・Shakeの振動設定を追加します。

Namespace
MeatMotion
Assembly
MeatMotion

メンバー一覧へ

public static partial class MotionBuilderExtensions
StringMotion.cs · L50

メンバー

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>
引数と戻り値
builder
this MotionBuilder<TValue, StringOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
richTextEnabled = true
bool 文字列の補間でリッチテキストを考慮するか。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, StringOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
scrambleMode
ScrambleMode 未表示の文字を埋める文字集合。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, StringOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
customScrambleChars
FixedString64Bytes 未表示の文字を埋める文字集合。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, StringOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
seed
uint 疑似乱数のシード。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, ShakeOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
seed
uint 疑似乱数のシード。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, PunchOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
frequency
int 振動の周波数設定。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, ShakeOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
frequency
int 振動の周波数設定。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, PunchOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
dampingRatio
float 振動の減衰設定。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, ShakeOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
dampingRatio
float 振動の減衰設定。
戻り値
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>
引数と戻り値
builder
this MotionBuilder<TValue, ShakeOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
shakeMode
ShakeMode 揺れの計算に使うノイズ方式。
戻り値
MotionBuilder<TValue, ShakeOptions, TAdapter>

Bind

構造体の状態をsetterに渡します。setterには補間値と状態がこの順で渡されます。

public static MotionHandle Bind<TState>(this FloatMotionBuilder builder, TState state, Action<float, TState> action)
    where TState : struct
引数と戻り値
builder
this FloatMotionBuilder 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
state
TState setterの呼び出し時に補間値に続けて渡す状態。
action
Action<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
引数と戻り値
builder
this MotionBuilder<TValue, TOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
state
TState setterの呼び出し時に補間値に続けて渡す状態。
action
Action<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>
引数と戻り値
builder
this MotionBuilder<TValue, IntegerOptions, TAdapter> 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
roundingMode
RoundingMode 整数補間の丸め規則。
戻り値
MotionBuilder<TValue, IntegerOptions, TAdapter>

関連する型