Vector2 for position and size on PositionComponent

This commit is contained in:
Lukas Klingsbo
2020-09-24 23:35:36 +02:00
parent 1625ff568b
commit f97f20ab73
33 changed files with 194 additions and 229 deletions

View File

@ -35,8 +35,7 @@ class TextComponent extends PositionComponent {
void _updateBox() {
_tp = config.toTextPainter(_text);
width = _tp.width;
height = _tp.height;
size.setValues(_tp.width, _tp.height);
}
@mustCallSuper