diff --git a/packages/trashy_road/assets/images/display/star_empty_1.png b/packages/trashy_road/assets/images/display/star_empty_1.png new file mode 100644 index 00000000..2f6fe4f7 Binary files /dev/null and b/packages/trashy_road/assets/images/display/star_empty_1.png differ diff --git a/packages/trashy_road/assets/images/display/star_empty_2.png b/packages/trashy_road/assets/images/display/star_empty_2.png new file mode 100644 index 00000000..ba553463 Binary files /dev/null and b/packages/trashy_road/assets/images/display/star_empty_2.png differ diff --git a/packages/trashy_road/assets/images/display/star_filled_golden_1.png b/packages/trashy_road/assets/images/display/star_filled_golden_1.png new file mode 100644 index 00000000..cb42851a Binary files /dev/null and b/packages/trashy_road/assets/images/display/star_filled_golden_1.png differ diff --git a/packages/trashy_road/assets/images/display/star_filled_golden_2.png b/packages/trashy_road/assets/images/display/star_filled_golden_2.png new file mode 100644 index 00000000..e0523297 Binary files /dev/null and b/packages/trashy_road/assets/images/display/star_filled_golden_2.png differ diff --git a/packages/trashy_road/lib/gen/assets.gen.dart b/packages/trashy_road/lib/gen/assets.gen.dart index 5913cf12..3d1401fa 100644 --- a/packages/trashy_road/lib/gen/assets.gen.dart +++ b/packages/trashy_road/lib/gen/assets.gen.dart @@ -66,9 +66,6 @@ class $AssetsAudioGen { /// File path: assets/audio/step1.mp3 String get step1 => 'assets/audio/step1.mp3'; - /// File path: assets/audio/steps.mp3 - String get steps => 'assets/audio/steps.mp3'; - /// File path: assets/audio/trash_collected.mp3 String get trashCollected => 'assets/audio/trash_collected.mp3'; @@ -94,7 +91,6 @@ class $AssetsAudioGen { runningTime, stagePass, step1, - steps, trashCollected, wrongBin ]; @@ -168,6 +164,9 @@ class $AssetsTilesGen { /// File path: assets/tiles/map4.tmx String get map4 => 'assets/tiles/map4.tmx'; + /// File path: assets/tiles/post_box.tx + String get postBox => 'assets/tiles/post_box.tx'; + /// File path: assets/tiles/road_lane.tx String get roadLane => 'assets/tiles/road_lane.tx'; @@ -223,6 +222,7 @@ class $AssetsTilesGen { map2, map3, map4, + postBox, roadLane, spawn, trashCanOrganic, @@ -314,6 +314,14 @@ class $AssetsImagesDisplayGen { SvgGenImage get starEmpty => const SvgGenImage('assets/images/display/star_empty.svg'); + /// File path: assets/images/display/star_empty_1.png + AssetGenImage get starEmpty1 => + const AssetGenImage('assets/images/display/star_empty_1.png'); + + /// File path: assets/images/display/star_empty_2.png + AssetGenImage get starEmpty2 => + const AssetGenImage('assets/images/display/star_empty_2.png'); + /// File path: assets/images/display/star_filled.svg SvgGenImage get starFilled => const SvgGenImage('assets/images/display/star_filled.svg'); @@ -322,6 +330,14 @@ class $AssetsImagesDisplayGen { SvgGenImage get starFilledGolden => const SvgGenImage('assets/images/display/star_filled_golden.svg'); + /// File path: assets/images/display/star_filled_golden_1.png + AssetGenImage get starFilledGolden1 => + const AssetGenImage('assets/images/display/star_filled_golden_1.png'); + + /// File path: assets/images/display/star_filled_golden_2.png + AssetGenImage get starFilledGolden2 => + const AssetGenImage('assets/images/display/star_filled_golden_2.png'); + /// File path: assets/images/display/stopwatch.png AssetGenImage get stopwatch => const AssetGenImage('assets/images/display/stopwatch.png'); @@ -358,8 +374,12 @@ class $AssetsImagesDisplayGen { slotPaperBox, slotPlasticBottle, starEmpty, + starEmpty1, + starEmpty2, starFilled, starFilledGolden, + starFilledGolden1, + starFilledGolden2, stopwatch, tutorialCollectTrash, tutorialDepositTrash, @@ -855,14 +875,10 @@ class Assets { static const $AssetsImagesGen images = $AssetsImagesGen(); static const $AssetsRiveGen rive = $AssetsRiveGen(); static const $AssetsTilesGen tiles = $AssetsTilesGen(); - static const String trashyRoadTiledProject = - 'assets/trashy_road.tiled-project'; - static const String trashyRoadTiledSession = - 'assets/trashy_road.tiled-session'; + static const String trashyRoad = 'assets/trashy_road.tiled-project'; /// List of all assets - static List get values => - [trashyRoadTiledProject, trashyRoadTiledSession]; + static List get values => [trashyRoad]; } class AssetGenImage { diff --git a/packages/trashy_road/lib/src/maps/widgets/game_map_tile.dart b/packages/trashy_road/lib/src/maps/widgets/game_map_tile.dart index 229b46f1..d07c0baa 100644 --- a/packages/trashy_road/lib/src/maps/widgets/game_map_tile.dart +++ b/packages/trashy_road/lib/src/maps/widgets/game_map_tile.dart @@ -96,11 +96,21 @@ class _Stars extends StatelessWidget { final int value; + static final _random = Random(); + static final _filledIimages = [ + Assets.images.display.starFilledGolden1, + Assets.images.display.starFilledGolden2, + ]; + static final _emptyIimages = [ + Assets.images.display.starEmpty1, + Assets.images.display.starEmpty2, + ]; + @override Widget build(BuildContext context) { - SvgGenImage star({required bool filled}) => filled - ? Assets.images.display.starFilled - : Assets.images.display.starEmpty; + AssetGenImage star({required bool filled}) => filled + ? _filledIimages[_random.nextInt(_filledIimages.length)] + : _emptyIimages[_random.nextInt(_emptyIimages.length)]; return LayoutBuilder( builder: (context, constraints) { @@ -110,12 +120,12 @@ class _Stars extends StatelessWidget { return Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - star(filled: value >= 1).svg(width: starWidth), + star(filled: value >= 1).image(width: starWidth), Padding( padding: const EdgeInsets.symmetric(horizontal: 5), - child: star(filled: value >= 2).svg(width: starWidth), + child: star(filled: value >= 2).image(width: starWidth), ), - star(filled: value >= 3).svg(width: starWidth), + star(filled: value >= 3).image(width: starWidth), ], ); }, diff --git a/packages/trashy_road/web/index.html b/packages/trashy_road/web/index.html index eed037bf..430aa442 100644 --- a/packages/trashy_road/web/index.html +++ b/packages/trashy_road/web/index.html @@ -1,5 +1,6 @@ + - + trashy_road @@ -39,16 +40,17 @@ + - + + \ No newline at end of file