Skip to content

Commit

Permalink
Fix door color breaking when enabling multiple time
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumlamm committed Apr 16, 2024
1 parent 102b492 commit 81e8168
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/scripts/door.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ func disable():
modulate *= 0.5

func enable():
$CollisionShape2D.disabled = false
modulate *= 2
if $CollisionShape2D.disabled:
$CollisionShape2D.disabled = false
modulate *= 2

func _on_body_entered(_body):
SfxAudio.play_sfx(SfxAudio.Sound.PORTAL)
Expand Down

0 comments on commit 81e8168

Please sign in to comment.