public static void ControlPoolSM(Pred persist, BulletManager.StyleSelector styles, StateMachine sm, ICancellee cT, Pred condFunc) { BEHControl pc = new BEHControl(b => { if (condFunc(b.rBPI)) { var exec = b.GetINode("f-pool-triggered", null); using var gcx = b.rBPI.ctx.RevertToGCX(exec); _ = exec.RunExternalSM(SMRunner.Cull(sm, cT, gcx)); } }, persist, BulletManager.BulletControl.P_RUN, cT); for (int ii = 0; ii < styles.Complex.Length; ++ii) { GetPool(styles.Complex[ii]).AddPoolControlEOF(pc); } }
public void Trigger(BehaviorEntity Exec, GenCtx gcx, ICancellee cT) { _ = Exec.GetINode("finish-triggered", null).RunExternalSM(SMRunner.Cull(this.states[0], cT, gcx)); }