init method

void init(
  1. dynamic widthRatio,
  2. dynamic heightRatio
)

Implementation

void init(widthRatio, heightRatio) {
  this.widthRatio = widthRatio;
  this.heightRatio = max(heightRatio, 0.65);

  /// Rain 0.1 Snow 0.5
  reset();
  y = Random().nextInt(800 ~/ scale).toDouble();
}