Skip to content

Instantly share code, notes, and snippets.

View juskek's full-sized avatar

Justin juskek

View GitHub Profile
class Fly {
final FlyTerminator game;
Rect? flyRect;
Paint flyPaint = Paint();
Fly(this.game, double x, double y) {
flyRect = Rect.fromLTWH(x, y, game.tileSize!, game.tileSize!);
flyPaint.color = Color(0xff6ab04c);
}
...
class FlyTerminator extends Game {
...
List<Fly>? flies;
Random? rnd;
FlyTerminator() {
initialize();
}
...
class FlyTerminator extends Game with TapDetector {
...
void spawnFly() {
...
flies!.add(Fly(this, x, y));
}
void update(double t) {
...