chore: Remove deprecations for v1.9.0 (#2749)

Removes everything that was marked as deprecated and that should be
removed for v1.9.0.
This commit is contained in:
Lukas Klingsbo
2023-09-19 16:47:41 +02:00
committed by GitHub
parent 7c2f400076
commit 9c1e1c3098
101 changed files with 238 additions and 287 deletions

View File

@ -24,9 +24,17 @@ class MultipleShapesExample extends FlameGame with HasCollisionDetection {
any direction.
''';
MultipleShapesExample()
: super(
world: MultiShapesWorld(),
camera: CameraComponent()..viewfinder.anchor = Anchor.topLeft,
);
}
class MultiShapesWorld extends World with HasGameReference {
@override
Future<void> onLoad() async {
add(FpsTextComponent(position: Vector2(0, size.y - 24)));
add(FpsTextComponent(position: Vector2(0, game.size.y - 24)));
final screenHitbox = ScreenHitbox();
final snowman = CollidableSnowman(
Vector2.all(150),
@ -41,7 +49,8 @@ class MultipleShapesExample extends FlameGame with HasCollisionDetection {
while (totalAdded < 1000) {
lastToAdd = nextRandomCollidable(lastToAdd, screenHitbox);
final lastBottomRight = lastToAdd.toAbsoluteRect().bottomRight;
if (lastBottomRight.dx < size.x && lastBottomRight.dy < size.y) {
if (lastBottomRight.dx < game.size.x &&
lastBottomRight.dy < game.size.y) {
add(lastToAdd);
totalAdded++;
} else {
@ -62,7 +71,7 @@ class MultipleShapesExample extends FlameGame with HasCollisionDetection {
lastCollidable.size.x / 2 +
_distance.x +
collidableSize.x >
size.x;
game.size.x;
var position = _distance + Vector2(0, lastCollidable.position.y + 200);
if (!isXOverflow) {
position = (lastCollidable.position + _distance)