mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-21 23:18:11 +00:00
block bouncing a mushroom, now changes its direction, if at an edge.
This commit is contained in:
@@ -75,4 +75,4 @@ movement_node = NodePath("../BasicEnemyMovement")
|
||||
metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
|
||||
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="on_area_entered"]
|
||||
[connection signal="block_bounced" from="BlockBouncingDetection" to="." method="block_bounce_up" unbinds=1]
|
||||
[connection signal="block_bounced" from="BlockBouncingDetection" to="." method="block_bounce_up"]
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user