Skip to content

Commit

Permalink
chore: update analysis (#40)
Browse files Browse the repository at this point in the history
* chore: update analysis

* chore: update analysis
  • Loading branch information
renancaraujo authored Oct 10, 2023
1 parent e6a6a72 commit 3d5be83
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include: package:very_good_analysis/analysis_options.3.1.0.yaml
include: package:very_good_analysis/analysis_options.yaml
linter:
rules:
public_member_api_docs: false
Expand Down
4 changes: 0 additions & 4 deletions lib/game/game/asteroid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,9 @@ class AsteroidSpawner extends Component
case GameState.playing:
timer = initialTimer;
timer.start();
break;
case GameState.initial:
case GameState.gameOver:
timer.stop();
break;
}
}
}
Expand Down Expand Up @@ -239,11 +237,9 @@ class Asteroid extends PositionComponent
case GameState.initial:
case GameState.playing:
removeFromParent();
break;
case GameState.gameOver:
rotateEffect?.pause();
moveAlongPathEffect?.pause();
break;
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions lib/game/game/ship.dart
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,13 @@ class ShipGlow extends SpriteComponent
case GameState.playing:
position.y = (parent.y / 2) - 20;
opacity = 1.0;
break;
case GameState.initial:
parent.parent.ship.angle = 0;
parent.parent.shadow.angle = 0;
parent.parent.shadow2.angle = 0;
opacity = 0.0;
break;
case GameState.gameOver:
position.y = parent.y / 2;

break;
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions lib/game/game/shots.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ class Cannon extends Component
case GameState.playing:
timer = initialTimer;
timer.start();
break;
case GameState.initial:
case GameState.gameOver:
timer.stop();
break;
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions lib/game/game/watchsteroids_game.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,12 @@ class LogoInitial extends SpriteComponent
add(
opacityEffect = OpacityEffect.to(1, effectController),
);
break;
case GameState.playing:
case GameState.gameOver:
effectController.setToStart();
add(
opacityEffect = OpacityEffect.to(0, effectController),
);
break;
}
}
}
Expand All @@ -187,15 +185,12 @@ class GameStateSyncController extends Component
calm: true,
);
gameRef.rotationCubit.rotateTo(0);
break;
case GameState.playing:
gameRef.overlays.clear();
gameRef.overlays.add('score');
break;
case GameState.gameOver:
gameRef.overlays.clear();
gameRef.overlays.add('gameOver');
break;
}
}
}
2 changes: 1 addition & 1 deletion lib/game/widgets/overlays.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _InitialOverlayState extends State<InitialOverlay> {
}

class CreditsOverlay extends StatelessWidget {
const CreditsOverlay({super.key, required this.progress});
const CreditsOverlay({required this.progress, super.key});

final double progress;

Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,10 @@ packages:
dependency: "direct dev"
description:
name: very_good_analysis
sha256: ebc48c51db35beeeec8c414e32f7bd78e612bd7f5992ccb0d46e19edaeb40b08
sha256: "9ae7f3a3bd5764fb021b335ca28a34f040cd0ab6eec00a1b213b445dae58a4b8"
url: "https://pub.dev"
source: hosted
version: "4.0.0+1"
version: "5.1.0"
vm_service:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
mocktail: ^1.0.0
very_good_analysis: ^4.0.0+1
very_good_analysis: ^5.1.0

flutter:
uses-material-design: true
Expand Down

0 comments on commit 3d5be83

Please sign in to comment.