protected override void Check(int procs) { if (procs > 0) { var p = ParticlePooler.Request(particlePrefab, tr.position); var newBurst = baseBurst; var ct = newBurst.count; ct.constant *= burstScale(procs); newBurst.count = ct; p.System.emission.SetBurst(0, newBurst); } }
private GameObject?ProcGO(Vector2 source, Vector2 target, float targetPerimeterRadius) { ProcMinors(); foreach (var sub in subEffects) { sub.Proc(source, target, targetPerimeterRadius); } if (spawnType == SpawnableType.Particle) { return(ParticlePooler.Request(particlePrefab, locator.Locate(source, target, targetPerimeterRadius)) .gameObject); } else if (spawnType == SpawnableType.RawInstantiate) { GameObject w = GameObject.Instantiate(particlePrefab); w.transform.localPosition = locator.Locate(source, target, targetPerimeterRadius); return(w); } return(null); }