fixed a bug where the invincibility palette would stop after collecting a starman at the last second

This commit is contained in:
JHDev2006
2025-10-22 17:24:41 +01:00
parent f9017881e1
commit b54c4b5913
3 changed files with 4 additions and 2 deletions

View File

@@ -43,6 +43,7 @@ region_rect = Rect2(0, 16, 32, 16)
shape = SubResource("RectangleShape2D_4k6gi")
[node name="PlacePreview" type="Node2D" parent="."]
visible = false
z_index = 1
[node name="NW" type="Sprite2D" parent="PlacePreview"]

View File

@@ -891,7 +891,8 @@ func do_smoke_effect() -> void:
func on_timeout() -> void:
AudioManager.stop_music_override(AudioManager.MUSIC_OVERRIDES.STAR)
await get_tree().create_timer(1, false).timeout
is_invincible = false
if $StarTimer.is_stopped():
is_invincible = false
func on_area_entered(area: Area2D) -> void: