/// <summary> /// Spawn the final bullet relative to the origin instead of the firing entity. /// Also set the V2RV2 to zero and remove the effects of rotational offset. /// Also set the color of the fire. /// <br/>Use this command to setup empty-guided fires. /// </summary> /// <param name="color">Color of fire</param> /// <param name="sp"></param> /// <returns></returns> public static SyncPattern Loc0c(string color, SyncPattern sp) => _AsGSR(sp, RootZero, GCP.Face(Facing.DEROT), GCP.Color(new[] { color }), Loc0Start);
/* * PASS-ALONG SYNCPATTERNS */ /// <summary> /// Spawn the final bullet relative to the origin instead of the firing entity. /// If the firing entity is a rotated summon, rotational offset will still apply. /// </summary> /// <param name="sp"></param> /// <returns></returns> public static SyncPattern World(SyncPattern sp) => _AsGSR(sp, GCP.Root(GCXF(Parametrics.Zero())));
/// <summary> /// Spawn the final bullet relative to the origin instead of the firing entity. /// Also set the V2RV2 to zero and remove the effects of rotational offset. /// <br/>Use this command to setup empty-guided fires. /// </summary> /// <param name="sp"></param> /// <returns></returns> public static SyncPattern Loc0(SyncPattern sp) => _AsGSR(sp, RootZero, GCP.Face(Facing.DEROT), Loc0Start);
public static SyncPattern SetP(GCXF <float> p, SyncPattern sp) => _AsGSR(sp, GCP.SetP(p));
/// <summary> /// Run the child SyncPattern twice, once without modification /// and once flipping the angle over the line Y=X. /// </summary> /// <param name="sp">Child SyncPattern to repeat</param> /// <returns></returns> public static SyncPattern DoubleFlipXY(SyncPattern sp) => _AsGSR(sp, GCP.Times(_ => 2), GCP.PostLoop(new GCRule[] { new GCRule <float>(ExType.Float, "rv2.a", GCOperator.Assign, GCXF(x => Sub(ExC(90f), RV2A(Reference <V2RV2>("rv2")(x))))) }));
/// <summary> /// Set the color of the fire, merging wildcards in the reverse direction. /// </summary> public static SyncPattern ColorR(string color, SyncPattern sp) => _AsGSR(sp, GCP.ColorR(new[] { color }));
/// <summary> /// Play a sound effect and then run the child SyncPattern. /// </summary> /// <param name="style">Sound effect style</param> /// <param name="sp">Child SyncPattern to run unchanged</param> /// <returns></returns> public static SyncPattern PSSFX(string style, SyncPattern sp) => _AsGSR(sp, GCP.SFX(new[] { style }));
public static AsyncPattern COnce(SyncPattern target) => _AsGCR(target, GCP.Times(_ => 1));