This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| class FlyTerminator extends Game { | |
| ... | |
| List<Fly>? flies; | |
| Random? rnd; | |
| FlyTerminator() { | |
| initialize(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| class FlyTerminator extends Game with TapDetector { | |
| ... | |
| void spawnFly() { | |
| ... | |
| flies!.add(Fly(this, x, y)); | |
| } | |
| void update(double t) { | |
| ... |
OlderNewer