samplePosition method

  1. @override
void samplePosition(
  1. Random random,
  2. Vector2 out
)
override

Writes a spawn offset, relative to the emitter, into out.

Implementation

@override
void samplePosition(Random random, Vector2 out) {
  out.setValues(
    (random.nextDouble() - 0.5) * width,
    (random.nextDouble() - 0.5) * height,
  );
}