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

@ -8,10 +8,9 @@ import 'package:flame/extensions/vector2.dart';
class Square extends PositionComponent {
final Paint _paint;
Square(this._paint, double x, double y, {double angle = 0.0}) {
size = Vector2(width, height);
this.x = x;
this.y = y;
Square(this._paint, Vector2 position, {double angle = 0.0}) {
size = Vector2.all(100.0);
this.position = position;
this.angle = angle;
anchor = Anchor.center;
}