public static void Resolve <V>(MotionBehaviour <V> self, Action <MotionBehaviour <float> > vec1, Action <MotionBehaviour <Vector2> > vec2, Action <MotionBehaviour <Vector3> > vec3, Action <MotionBehaviour <Vector4> > vec4) { Resolve <V>( () => vec1((MotionBehaviour <float>)(object) self), () => vec2((MotionBehaviour <Vector2>)(object) self), () => vec3((MotionBehaviour <Vector3>)(object) self), () => vec4((MotionBehaviour <Vector4>)(object) self) ); }
public static MotionBehaviour <V> Accel <V, T>(this MotionBehaviour <V> self, T accel) { Syntax.Resolve <V>(self, (e) => e.Add(Vel.Accel(Syntax.AsEnumerator <float, T>(accel))), (e) => e.Add(Vel.Accel(Syntax.AsEnumerator <Vector2, T>(accel))), (e) => e.Add(Vel.Accel(Syntax.AsEnumerator <Vector3, T>(accel))), (e) => e.Add(Vel.Accel(Syntax.AsEnumerator <Vector4, T>(accel))) ); return(self); }
public static MotionBehaviour <V> Discrete <V, T>(this MotionBehaviour <V> self, T interval) { Syntax.Resolve <V>(self, (e) => e.Wrap((v) => Filter.Discrete(v, Syntax.AsEnumerator <float, T>(interval))), (e) => e.Wrap((v) => Filter.Discrete(v, Syntax.AsEnumerator <float, T>(interval))), (e) => e.Wrap((v) => Filter.Discrete(v, Syntax.AsEnumerator <float, T>(interval))), (e) => e.Wrap((v) => Filter.Discrete(v, Syntax.AsEnumerator <float, T>(interval))) ); return(self); }
public static MotionBehaviour <V> AmplifyComponents <V, T>(this MotionBehaviour <V> self, T value) { Syntax.Resolve <V>(self, (e) => e.Wrap((v) => Filter.AmplifyComponents(v, Syntax.AsEnumerator <float, T>(value))), (e) => e.Wrap((v) => Filter.AmplifyComponents(v, Syntax.AsEnumerator <Vector2, T>(value))), (e) => e.Wrap((v) => Filter.AmplifyComponents(v, Syntax.AsEnumerator <Vector3, T>(value))), (e) => e.Wrap((v) => Filter.AmplifyComponents(v, Syntax.AsEnumerator <Vector4, T>(value))) ); return(self); }
public static MotionBehaviour <V> Negate <V>(this MotionBehaviour <V> self) { Syntax.Resolve <V>(self, (e) => e.Wrap((v) => Filter.Negate(v)), (e) => e.Wrap((v) => Filter.Negate(v)), (e) => e.Wrap((v) => Filter.Negate(v)), (e) => e.Wrap((v) => Filter.Negate(v)) ); return(self); }
public static MotionBehaviour <V> Map <V, T>(this MotionBehaviour <V> self, Func <V, V> map) { Syntax.Resolve <V>(self, (e) => e.Wrap((v) => Filter.Map <float>(v, (Func <float, float>)(object) map)), (e) => e.Wrap((v) => Filter.Map <Vector2>(v, (Func <Vector2, Vector2>)(object) map)), (e) => e.Wrap((v) => Filter.Map <Vector3>(v, (Func <Vector3, Vector3>)(object) map)), (e) => e.Wrap((v) => Filter.Map <Vector4>(v, (Func <Vector4, Vector4>)(object) map)) ); return(self); }
public static MotionBehaviour <V> AccelByRatio <V, T>(this MotionBehaviour <V> self, V iv, T accel) { Syntax.Resolve <V>(self, (e) => e.Add(Vel.AccelByRatio((float )(object)iv, Syntax.AsEnumerator <float, T>(accel))), (e) => e.Add(Vel.AccelByRatio((Vector2)(object)iv, Syntax.AsEnumerator <float, T>(accel))), (e) => e.Add(Vel.AccelByRatio((Vector3)(object)iv, Syntax.AsEnumerator <float, T>(accel))), (e) => e.Add(Vel.AccelByRatio((Vector4)(object)iv, Syntax.AsEnumerator <float, T>(accel))) ); return(self); }
public static MotionBehaviour <V> Lifetime <V, T>(this MotionBehaviour <V> self, T period) { Syntax.Resolve <V>(self, (e) => e.Wrap((v) => LifeCycle.Lifetime(v, Syntax.AsEnumerator <float, T>(period))), (e) => e.Wrap((v) => LifeCycle.Lifetime(v, Syntax.AsEnumerator <float, T>(period))), (e) => e.Wrap((v) => LifeCycle.Lifetime(v, Syntax.AsEnumerator <float, T>(period))), (e) => e.Wrap((v) => LifeCycle.Lifetime(v, Syntax.AsEnumerator <float, T>(period))) ); return(self); }
public static MotionBehaviour <V> LiveWhile <V>(this MotionBehaviour <V> self, Func <V, bool> condition) { Syntax.Resolve <V>(self, (e) => e.Wrap((v) => LifeCycle.LiveWhile(v as IEnumerator <float>, condition as Func <float, bool>)), (e) => e.Wrap((v) => LifeCycle.LiveWhile(v as IEnumerator <Vector2>, condition as Func <Vector2, bool>)), (e) => e.Wrap((v) => LifeCycle.LiveWhile(v as IEnumerator <Vector3>, condition as Func <Vector3, bool>)), (e) => e.Wrap((v) => LifeCycle.LiveWhile(v as IEnumerator <Vector4>, condition as Func <Vector4, bool>)) ); return(self); }
public static MotionBehaviour <V> AimAt <V, T1, T2>(this MotionBehaviour <V> self, T1 destination, T2 speed) { Syntax.Resolve <V>(self, (e) => e.Add(Aiming.AimAt(Syntax.AsEnumerator <float, T1>(destination), Syntax.AsEnumerator <float, T2>(speed), e.ValueEnumerator)), (e) => e.Add(Aiming.AimAt(Syntax.AsEnumerator <Vector2, T1>(destination), Syntax.AsEnumerator <float, T2>(speed), e.ValueEnumerator)), (e) => e.Add(Aiming.AimAt(Syntax.AsEnumerator <Vector3, T1>(destination), Syntax.AsEnumerator <float, T2>(speed), e.ValueEnumerator)), (e) => e.Add(Aiming.AimAt(Syntax.AsEnumerator <Vector4, T1>(destination), Syntax.AsEnumerator <float, T2>(speed), e.ValueEnumerator)) ); return(self); }
public static MotionBehaviour <V> Sin <V, T1, T2>(this MotionBehaviour <V> self, T1 radius, T2 freq) { Syntax.Resolve <V>(self, (e) => e.Add(Movement.Sin(Syntax.AsEnumerator <float, T1>(radius), Syntax.AsEnumerator <float, T2>(freq), self.FrameRate)), (e) => e.Add(Movement.Sin(Syntax.AsEnumerator <Vector2, T1>(radius), Syntax.AsEnumerator <float, T2>(freq), self.FrameRate)), (e) => e.Add(Movement.Sin(Syntax.AsEnumerator <Vector3, T1>(radius), Syntax.AsEnumerator <float, T2>(freq), self.FrameRate)), (e) => e.Add(Movement.Sin(Syntax.AsEnumerator <Vector4, T1>(radius), Syntax.AsEnumerator <float, T2>(freq), self.FrameRate)) ); return(self); }
public static MotionBehaviour <V> LiveThreshold <V, T>(this MotionBehaviour <V> self, T threshold, Func <float, float, bool> comparator) { Syntax.Resolve <V>(self, (e) => e.Wrap((v) => LifeCycle.LiveThreshold(v, Syntax.AsEnumerator <float, T>(threshold), comparator)), (e) => e.Wrap((v) => LifeCycle.LiveThreshold(v, Syntax.AsEnumerator <float, T>(threshold), comparator)), (e) => e.Wrap((v) => LifeCycle.LiveThreshold(v, Syntax.AsEnumerator <float, T>(threshold), comparator)), (e) => e.Wrap((v) => LifeCycle.LiveThreshold(v, Syntax.AsEnumerator <float, T>(threshold), comparator)) ); return(self); }
public static MotionBehaviour <V> Perlin <V>(this MotionBehaviour <V> self, V speed) { Syntax.Resolve <V>(self, (e) => e.Add(Noise.Perlin((float )(object)speed, self.FrameRate)), (e) => e.Add(Noise.Perlin((Vector2)(object)speed, self.FrameRate)), (e) => e.Add(Noise.Perlin((Vector3)(object)speed, self.FrameRate)), (e) => e.Add(Noise.Perlin((Vector4)(object)speed, self.FrameRate)) ); return(self); }
public static MotionBehaviour <V> StartDelay <V, T>(this MotionBehaviour <V> self, T delay) { Syntax.Resolve <V>(self, (e) => e.Wrap((v) => LifeCycle.Delay(v, Syntax.AsEnumerator <float, T>(delay))), (e) => e.Wrap((v) => LifeCycle.Delay(v, Syntax.AsEnumerator <float, T>(delay))), (e) => e.Wrap((v) => LifeCycle.Delay(v, Syntax.AsEnumerator <float, T>(delay))), (e) => e.Wrap((v) => LifeCycle.Delay(v, Syntax.AsEnumerator <float, T>(delay))) ); return(self); }
public static MotionBehaviour <V> Fbm <V>(this MotionBehaviour <V> self, V offset, V speed, int octave) { Syntax.Resolve <V>(self, (e) => e.Add(Noise.FbmWith((float )(object)offset, (float )(object)speed, octave, self.FrameRate)), (e) => e.Add(Noise.FbmWith((Vector2)(object)offset, (Vector2)(object)speed, octave, self.FrameRate)), (e) => e.Add(Noise.FbmWith((Vector3)(object)offset, (Vector3)(object)speed, octave, self.FrameRate)), (e) => e.Add(Noise.FbmWith((Vector4)(object)offset, (Vector4)(object)speed, octave, self.FrameRate)) ); return(self); }
public static MotionBehaviour <V> Union <V>(this MotionBehaviour <V> self) { Syntax.Resolve <V>(self, (e) => e.Compose((a, b) => Composing.Union(a, b)), (e) => e.Compose((a, b) => Composing.Union(a, b)), (e) => e.Compose((a, b) => Composing.Union(a, b)), (e) => e.Compose((a, b) => Composing.Union(a, b)) ); return(self); }
public static MotionBehaviour <V> Capture <V>(this MotionBehaviour <V> self, out IEnumerator <V> capture) { var res = new IEnumerator <V>[] { null }; Syntax.Resolve <V>(self, (e) => e.Wrap((v) => Cap.Create(v, (IEnumerator <float>[])(object) res)), (e) => e.Wrap((v) => Cap.Create(v, (IEnumerator <Vector2>[])(object) res)), (e) => e.Wrap((v) => Cap.Create(v, (IEnumerator <Vector3>[])(object) res)), (e) => e.Wrap((v) => Cap.Create(v, (IEnumerator <Vector4>[])(object) res)) ); capture = res[0]; return(self); }
public static MotionBehaviour <V> AimRatioAt <V>(this MotionBehaviour <V> self, Func <V> destination, Func <float> ratio) { return(AimRatioAt <V>(self, destination, ratio)); }
public static MotionBehaviour <V> AimVelocity <V>(this MotionBehaviour <V> self, Func <V> destination, Func <V> speed) { return(AimVelocity <V>(self, destination, speed)); }
public static MotionBehaviour <V> LiveThreshold <V>(this MotionBehaviour <V> self, Func <V> threshold, Func <float, float, bool> comparator) { return(LiveThreshold <V, Func <V> >(self, threshold, comparator)); }
public static MotionBehaviour <V> LiveThreshold <V>(this MotionBehaviour <V> self, Func <V> threshold) { return(LiveThreshold <V, Func <V> >(self, threshold)); }
public static MotionBehaviour <V> LiveThreshold <V>(this MotionBehaviour <V> self) { return(LiveThreshold <V, float>(self, 0.01f)); }
public static MotionBehaviour <V> StartDelay <V>(this MotionBehaviour <V> self, Func <float> delay) { return(StartDelay <V, Func <float> >(self, delay)); }
public static MotionBehaviour <V> AimCriticalDampingAt <V>(this MotionBehaviour <V> self, Func <V> destination, Func <float> speed) { return(AimCriticalDampingAt <V>(self, destination, speed)); }
public static MotionBehaviour <Vector2> Hypocycloid(this MotionBehaviour <Vector2> self, Func <float> A, Func <float> B, float rc, float rm, Func <float> speed) { return(Hypocycloid <Func <float>, Func <float>, Func <float> >(self, A, B, rc, rm, speed)); }
public static MotionBehaviour <V> AimSpringAt <V>(this MotionBehaviour <V> self, Func <V> destination, Func <float> ratio, Func <float> bounce) { return(AimSpringAt <V>(self, destination, ratio, bounce)); }
public static MotionBehaviour <Vector2> Circular(this MotionBehaviour <Vector2> self, Func <float> radius, Func <float> speed) { return(Circular <Func <float>, Func <float> >(self, radius, speed)); }
public static MotionBehaviour <Vector2> Lissajous(this MotionBehaviour <Vector2> self, Func <float> A, Func <float> B, Func <float> a, Func <float> b, float delta) { return(Lissajous <Func <float>, Func <float>, Func <float>, Func <float> >(self, A, B, a, b, delta)); }
public static MotionBehaviour <V> Lifetime <V>(this MotionBehaviour <V> self, Func <float> period) { return(Lifetime <V, Func <float> >(self, period)); }
public static MotionBehaviour <V> Cos <V>(this MotionBehaviour <V> self, Func <V> radius, Func <float> freq) { return(Cos <V, Func <V>, Func <float> >(self, radius, freq)); }