Skip to content

Instantly share code, notes, and snippets.

@juskek
Last active August 24, 2021 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juskek/42bd710cc57cbb39535f7de8b6a0a7fa to your computer and use it in GitHub Desktop.
Save juskek/42bd710cc57cbb39535f7de8b6a0a7fa to your computer and use it in GitHub Desktop.
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);
}
void render(Canvas c) {
c.drawRect(flyRect!, flyPaint);
}
void update(double t) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment