mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 03:15:43 +08:00
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:
@ -21,7 +21,7 @@ class BouncingBallExample extends FlameGame with HasCollisionDetection {
|
||||
}
|
||||
|
||||
class Ball extends CircleComponent
|
||||
with HasGameRef<FlameGame>, CollisionCallbacks {
|
||||
with HasGameReference<FlameGame>, CollisionCallbacks {
|
||||
late Vector2 velocity;
|
||||
|
||||
Ball() {
|
||||
@ -52,7 +52,7 @@ class Ball extends CircleComponent
|
||||
}
|
||||
|
||||
void get _resetBall {
|
||||
position = gameRef.size / 2;
|
||||
position = game.size / 2;
|
||||
final spawnAngle = getSpawnAngle;
|
||||
|
||||
final vx = math.cos(spawnAngle * degree) * speed;
|
||||
@ -86,7 +86,7 @@ class Ball extends CircleComponent
|
||||
velocity.y = velocity.y;
|
||||
}
|
||||
// Right Side Collision
|
||||
if (collisionPoint.x == gameRef.size.x) {
|
||||
if (collisionPoint.x == game.size.x) {
|
||||
velocity.x = -velocity.x;
|
||||
velocity.y = velocity.y;
|
||||
}
|
||||
@ -96,7 +96,7 @@ class Ball extends CircleComponent
|
||||
velocity.y = -velocity.y;
|
||||
}
|
||||
// Bottom Side Collision
|
||||
if (collisionPoint.y == gameRef.size.y) {
|
||||
if (collisionPoint.y == game.size.y) {
|
||||
velocity.x = velocity.x;
|
||||
velocity.y = -velocity.y;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user