Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Merge branch 'alestiago/add-players-audio-effect' of https://github.c…
Browse files Browse the repository at this point in the history
…om/alestiago/trashy_road into alestiago/add-players-audio-effect
  • Loading branch information
alestiago committed Mar 10, 2024
2 parents b4c9b42 + 7e56d70 commit 1904ec3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/trashy_road/lib/src/game/view/game_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class _GameView extends StatelessWidget {
if (isTutorial)
const Align(
alignment: Alignment(0, -0.6),
child: GameTutorial(),
child: TutorialHud(),
),
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ enum _TutorialStatus {
completed,
}

/// {@template GameTutorial}
/// {@template TutorialHud}
/// Displays tutorial information based on the current game state.
/// {@endtemplate}
class GameTutorial extends StatefulWidget {
/// {@macro GameTutorial}
const GameTutorial({super.key});
class TutorialHud extends StatefulWidget {
/// {@macro TutorialHud}
const TutorialHud({super.key});

@override
State<GameTutorial> createState() => _GameTutorialState();
State<TutorialHud> createState() => _TutorialHudState();
}

class _GameTutorialState extends State<GameTutorial> {
class _TutorialHudState extends State<TutorialHud> {
_TutorialStatus _tutorialStatus = _TutorialStatus.movement;

@override
Expand Down
2 changes: 1 addition & 1 deletion packages/trashy_road/lib/src/game/widgets/widgets.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export 'animated_star.dart';
export 'game_background_music_listener.dart';
export 'game_stopwatch.dart';
export 'game_tutorial.dart';
export 'inventory_hud.dart';
export 'pause_button.dart';
export 'playing_hud_transition.dart';
export 'stopwatch_icon.dart';
export 'top_hud.dart';
export 'trashy_road_game_widget.dart';
export 'tutorial_hud.dart';
13 changes: 9 additions & 4 deletions packages/trashy_road/lib/src/maps/bloc/game_maps_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,13 @@ class GameMap extends Equatable {
required this.displayName,
required this.score,
required this.ratingSteps,
required this.locked,
required bool locked,
required this.path,
}) : scoreRating = ScoreRating.fromSteps(
}) : scoreRating = ScoreRating.fromSteps(
score: score,
steps: ratingSteps,
);
),
_locked = locked;

/// The identifier of the map.
final String identifier;
Expand All @@ -149,10 +150,14 @@ class GameMap extends Equatable {
/// {@macro ScoreRating}
final ScoreRating scoreRating;

final bool _locked;

/// Whether the map is locked and cannot be played.
///
/// A locked map is usually a map that is not yet available to the player.
final bool locked;
bool get locked {
return !(Uri.base.queryParameters['admin'] == 'true') && _locked;
}

/// The path to the map file.
final String path;
Expand Down

0 comments on commit 1904ec3

Please sign in to comment.