mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 19:12:31 +08:00
Follow a Vector2 in Camera and add onPositionUpdate (#716)
* No setter for position and size * Use setter for position and size * Add onPositionUpdate and snapTo to Camera * Fix formatting * Fix size in test * Update packages/flame/CHANGELOG.md Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net> * Update packages/flame/CHANGELOG.md Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net> * Better naming for internal position state * Anchor and angle defaults on effect test utils * No setter for position and size * Fix scale effect * Fix formatting Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net> Co-authored-by: Erick Zanardo <erickzanardoo@gmail.com>
This commit is contained in:
@ -13,11 +13,10 @@ class ScaleEffectGame extends BaseGame with TapDetector {
|
||||
|
||||
@override
|
||||
Future<void> onLoad() async {
|
||||
add(
|
||||
square = SquareComponent()
|
||||
..position = Vector2.all(200)
|
||||
..anchor = Anchor.center,
|
||||
);
|
||||
square = SquareComponent()
|
||||
..position.setValues(200, 200)
|
||||
..anchor = Anchor.center;
|
||||
add(square);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user