public void CreateHitSparkAtPosition(Vector2 position, Type type) { RexParticle spark = (type == Type.DamagedSpark) ? damagedSparkPool.Spawn().GetComponent <RexParticle>() : notDamagedSparkPool.Spawn().GetComponent <RexParticle>(); spark.transform.position = position; spark.transform.localEulerAngles = new Vector3(0, 0, RexMath.RandomFloat(0, 360)); spark.Play(); }