Beispiel #1
0
 public static AsyncPattern Eruption(GCXF <float> wait, GCXF <float> times, ExBPY angleOffset,
                                     ExBPY speed, ExBPY gravity, GenCtxProperty[] props) => _AsGCR(S(GCXU(VTPRepo.Velocity(
                                                                                                              TPr.PX(speed),
                                                                                                              TPr.PY(gravity)
                                                                                                              ))), props, GenCtxProperty.WT(wait, times), GenCtxProperty.PreLoop(new GCRule[] {
     new GCRule <float>(ExType.Float, "rv2.a", GCOperator.Assign,
                        GCXF(x => Add(angleOffset(x), RV2A(BRV2(x)))))
 }));
Beispiel #2
0
 /// <summary>
 /// Add the Y-difference from the executing BehaviorEntity to the target to the child SyncPattern.
 /// </summary>
 /// <param name="target">Target</param>
 /// <param name="syncPattern">Child SyncPattern to modify</param>
 /// <returns></returns>
 public static SyncPattern TargetY(GCXF <Vector2> target, SyncPattern[] syncPattern) => _AsGSR(syncPattern, GenCtxProperty.Target(RV2ControlMethod.RY, target));
Beispiel #3
0
 /// <summary>
 /// Equal to `gsr { start rv2.ry +=f rand from to } sp`
 /// </summary>
 public static SyncPattern RandomY(ExBPY from, ExBPY to, SyncPattern sp) => _AsGSR(sp,
                                                                                   GenCtxProperty.Start(new GCRule[] {
     new GCRule <float>(ExType.Float, "rv2.ry", GCOperator.AddAssign,
                        GCXF(x => ExM.Rand(from(x), to(x))))
 }));
Beispiel #4
0
 /// <summary>
 /// Delay a synchronous invokee by a given number of frames.
 /// </summary>
 /// <param name="delay">Frame delay</param>
 /// <param name="next">Synchronous invokee to delay</param>
 /// <returns></returns>
 public static AsyncPattern CDelay(GCXF <float> delay, SyncPattern next) => _AsGCR(next, GenCtxProperty.Delay(delay));
Beispiel #5
0
 public static AsyncPattern GCRepeat3(GCXF <float> wait, GCXF <float> forTime, GCXF <V2RV2> rpp, GenCtxProperty[] props, SyncPattern[] target) =>
 GCRepeat(new GenCtxProperties <AsyncPattern>(props.Append(GenCtxProperty.AsyncFor(wait, forTime, rpp))), target);
Beispiel #6
0
 public static AsyncPattern GCRepeatFRV2(GCXF <float> wait, GCXF <float> times, GCXF <V2RV2> frv2, GenCtxProperty[] props, SyncPattern[] target) =>
 GCRepeat(new GenCtxProperties <AsyncPattern>(props.Append(GenCtxProperty.WT(wait, times)).Append(GenCtxProperty.FRV2(frv2))), target);
Beispiel #7
0
 public static AsyncPattern GCRepeat2dr(ExBPY difficulty, ExBPY wait, ExBPY times, ExBPRV2 rpp, GenCtxProperty[] props, SyncPattern[] target) =>
 GCRepeat(new GenCtxProperties <AsyncPattern>(props.Append(GenCtxProperty.AsyncDR(difficulty, wait, times, rpp))), target);
Beispiel #8
0
 /// <param name="wait">Frames to wait between invocations</param>
 /// <param name="times">Number of invocations</param>
 /// <param name="rpp">Amount to increment rv2 between invocations</param>
 /// <param name="props">Other properties</param>
 /// <param name="target">Child StateMachines to run</param>
 public GTRepeat2(GCXF <float> wait, GCXF <float> times, GCXF <V2RV2> rpp, GenCtxProperty[] props, StateMachine[] target) :
     base(new GenCtxProperties <StateMachine>(props.Append(GenCtxProperty.Async(wait, times, rpp))), target)
 {
 }