Fixed with regards to the comments

This commit is contained in:
Lukas Klingsbo
2020-09-30 20:49:19 +02:00
parent 49029db6ac
commit 0f9fc2c60e
20 changed files with 74 additions and 78 deletions

View File

@ -22,10 +22,9 @@ class TapableSquare extends PositionComponent with Tapable {
bool _beenPressed = false;
TapableSquare({double y = 100, double x = 100}) {
TapableSquare({Vector2 position}) {
size = Vector2.all(100);
this.x = x;
this.y = y;
this.position = position ?? Vector2.all(100);
}
@override
@ -52,7 +51,7 @@ class TapableSquare extends PositionComponent with Tapable {
class MyGame extends BaseGame with HasTapableComponents {
MyGame() {
add(TapableSquare(y: 100));
add(TapableSquare(y: 250));
add(TapableSquare());
add(TapableSquare()..y = 250);
}
}