mirror of
				https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
				synced 2025-10-26 09:20:49 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			427 B
		
	
	
	
		
			GDScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			427 B
		
	
	
	
		
			GDScript
		
	
	
	
	
	
| extends Control
 | |
| 
 | |
| signal cancelled
 | |
| var is_active := false
 | |
| 
 | |
| func _physics_process(delta: float) -> void:
 | |
| 	modulate.a = lerpf(modulate.a, int(is_active), delta * 15)
 | |
| 	if Input.is_action_just_released("ui_back") and is_active:
 | |
| 		cancelled.emit()
 | |
| 		is_active = false
 | |
| 		$AnimationPlayer.stop()
 | |
| 
 | |
| func start() -> void:
 | |
| 	$AnimationPlayer.play("Animation")
 | |
| 	is_active = true
 | |
| 	await $AnimationPlayer.animation_finished
 | |
| 	get_tree().quit()
 | 
