MMotion
開始値・終了値・秒数からTweenを作ります。floatの端点にはFloatMotionBuilderを返します。
public static partial class MMotionStringMotion.cs · L24専用floatビルダーを使う
using MeatMotion; を追加します。floatリテラルを渡すとFloatMotionBuilderを取得できます。
float volume = 1f;
using var world = new MotionWorld();
MMotion.Create(1f, 0f, 0.5f)
.WithScheduler(world)
.Bind(v => volume = v);
world.Tick(0.25);
メンバー
Create
始点と終点の型でオーバーロードを選びます。durationは秒です。設定オブジェクトを渡す形式では、その値からビルダーを復元します。
public static FloatMotionBuilder Create(float from, float to, float duration)引数と戻り値
fromfloat補間の開始値。tofloat補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
FloatMotionBuilder
public static MotionBuilder<double, NoOptions, DoubleMotionAdapter> Create(double from, double to, float duration)引数と戻り値
fromdouble補間の開始値。todouble補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<double, NoOptions, DoubleMotionAdapter>
public static MotionBuilder<int, IntegerOptions, IntMotionAdapter> Create(int from, int to, float duration)引数と戻り値
fromint補間の開始値。toint補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<int, IntegerOptions, IntMotionAdapter>
public static MotionBuilder<long, IntegerOptions, LongMotionAdapter> Create(long from, long to, float duration)引数と戻り値
fromlong補間の開始値。tolong補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<long, IntegerOptions, LongMotionAdapter>
public static MotionBuilder<Vector2, NoOptions, Vector2MotionAdapter> Create(Vector2 from, Vector2 to, float duration)引数と戻り値
fromVector2補間の開始値。toVector2補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<Vector2, NoOptions, Vector2MotionAdapter>
public static MotionBuilder<Vector3, NoOptions, Vector3MotionAdapter> Create(Vector3 from, Vector3 to, float duration)引数と戻り値
fromVector3補間の開始値。toVector3補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<Vector3, NoOptions, Vector3MotionAdapter>
public static MotionBuilder<Vector4, NoOptions, Vector4MotionAdapter> Create(Vector4 from, Vector4 to, float duration)引数と戻り値
fromVector4補間の開始値。toVector4補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<Vector4, NoOptions, Vector4MotionAdapter>
public static MotionBuilder<Quaternion, NoOptions, QuaternionMotionAdapter> Create(Quaternion from, Quaternion to, float duration)引数と戻り値
fromQuaternion補間の開始値。toQuaternion補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<Quaternion, NoOptions, QuaternionMotionAdapter>
public static MotionBuilder<Color, NoOptions, ColorMotionAdapter> Create(Color from, Color to, float duration)引数と戻り値
fromColor補間の開始値。toColor補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<Color, NoOptions, ColorMotionAdapter>
public static MotionBuilder<Rect, NoOptions, RectMotionAdapter> Create(Rect from, Rect to, float duration)引数と戻り値
fromRect補間の開始値。toRect補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<Rect, NoOptions, RectMotionAdapter>
public static MotionBuilder<TValue, TOptions, TAdapter> Create<TValue, TOptions, TAdapter>(in TValue from, in TValue to, float duration)
where TValue : unmanaged
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>引数と戻り値
fromin TValue補間の開始値。toin TValue補間の終了値。durationfloat開始から終了までの秒数。- 戻り値
MotionBuilder<TValue, TOptions, TAdapter>
public static MotionBuilder<float, NoOptions, FloatMotionAdapter> Create(MotionSettings<float, NoOptions> settings)引数と戻り値
settingsMotionSettings<float, NoOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<float, NoOptions, FloatMotionAdapter>
public static MotionBuilder<double, NoOptions, DoubleMotionAdapter> Create(MotionSettings<double, NoOptions> settings)引数と戻り値
settingsMotionSettings<double, NoOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<double, NoOptions, DoubleMotionAdapter>
public static MotionBuilder<int, IntegerOptions, IntMotionAdapter> Create(MotionSettings<int, IntegerOptions> settings)引数と戻り値
settingsMotionSettings<int, IntegerOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<int, IntegerOptions, IntMotionAdapter>
public static MotionBuilder<long, IntegerOptions, LongMotionAdapter> Create(MotionSettings<long, IntegerOptions> settings)引数と戻り値
settingsMotionSettings<long, IntegerOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<long, IntegerOptions, LongMotionAdapter>
public static MotionBuilder<Vector2, NoOptions, Vector2MotionAdapter> Create(MotionSettings<Vector2, NoOptions> settings)引数と戻り値
settingsMotionSettings<Vector2, NoOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<Vector2, NoOptions, Vector2MotionAdapter>
public static MotionBuilder<Vector3, NoOptions, Vector3MotionAdapter> Create(MotionSettings<Vector3, NoOptions> settings)引数と戻り値
settingsMotionSettings<Vector3, NoOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<Vector3, NoOptions, Vector3MotionAdapter>
public static MotionBuilder<Vector4, NoOptions, Vector4MotionAdapter> Create(MotionSettings<Vector4, NoOptions> settings)引数と戻り値
settingsMotionSettings<Vector4, NoOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<Vector4, NoOptions, Vector4MotionAdapter>
public static MotionBuilder<Quaternion, NoOptions, QuaternionMotionAdapter> Create(MotionSettings<Quaternion, NoOptions> settings)引数と戻り値
settingsMotionSettings<Quaternion, NoOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<Quaternion, NoOptions, QuaternionMotionAdapter>
public static MotionBuilder<Color, NoOptions, ColorMotionAdapter> Create(MotionSettings<Color, NoOptions> settings)引数と戻り値
settingsMotionSettings<Color, NoOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<Color, NoOptions, ColorMotionAdapter>
public static MotionBuilder<Rect, NoOptions, RectMotionAdapter> Create(MotionSettings<Rect, NoOptions> settings)引数と戻り値
settingsMotionSettings<Rect, NoOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<Rect, NoOptions, RectMotionAdapter>
public static MotionBuilder<TValue, TOptions, TAdapter> Create<TValue, TOptions, TAdapter>(MotionSettings<TValue, TOptions> settings)
where TValue : unmanaged
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>引数と戻り値
settingsMotionSettings<TValue, TOptions>開始値・終了値・タイミングなどを保存した設定。- 戻り値
MotionBuilder<TValue, TOptions, TAdapter>
MeatMotion