block bouncing a mushroom, now changes its direction, if at an edge.

This commit is contained in:
JHDev2006
2025-09-21 14:03:39 +01:00
parent 321ebb8e6b
commit 6013a7da77
3 changed files with 7 additions and 2 deletions

View File

@@ -27,7 +27,8 @@ func on_area_entered(area: Area2D) -> void:
if area.owner is Player:
collect_item(area.owner)
func block_bounce_up() -> void:
func block_bounce_up(block: Node2D) -> void:
direction = -sign(block.global_position.x - global_position.x + 0.1)
velocity.y = -200
func block_dispense_tween() -> void:

View File

@@ -337,6 +337,10 @@ func check_for_medal_achievement() -> void:
has_silver_levels_any = false
if best_level_any_times[i] > LEVEL_GOLD_ANY_TIMES[Global.current_campaign][i] * MEDAL_CONVERSIONS[0]:
has_bronze_levels_any = false
else:
has_gold_levels_any = false
has_silver_levels_any = false
has_bronze_levels_any = false
var world := 0
for i in best_level_warpless_times: