Fix mem leaks in the demo
This commit is contained in:
parent
78396708d4
commit
1cb85807dd
|
@ -41,6 +41,8 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
|
||||
func _die() -> void:
|
||||
if _is_dead:
|
||||
return
|
||||
_is_dead = true
|
||||
trail.emitting = false
|
||||
root.hide()
|
||||
|
|
|
@ -39,6 +39,8 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
|
||||
func _die() -> void:
|
||||
if _is_dead:
|
||||
return
|
||||
_is_dead = true
|
||||
root.hide()
|
||||
collision_shape_2d.set_deferred(&"disabled", true)
|
||||
|
|
Loading…
Reference in New Issue