Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Amateur.game.dev. |
extends Popup
var notPaused = true
var paused = true
func _process(_delta):
if Input.is_action_just_pressed("Pause"):
if notPaused:
get_tree().paused = true
visible = true
func _on_Resume_pressed():
if paused:
get_tree().paused = false
visible = false
func _on_Restart_pressed():
get_tree().reload_current_scene()
this should work as it did work before, but i can see the enemy moving in the idle state in the background.
Edit: I had the player, enemy and node2D nodes on process, when they should’ve been on inherit, its working fine now.