Change way of gettng Managers to use class name
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
extends Control
|
||||
|
||||
@onready var _Restart_btn: Button = %Restart
|
||||
const GAME_MANAGER = preload("res://GameManager.gd")
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_Restart_btn.pressed.connect(_restart)
|
||||
|
||||
func _restart():
|
||||
GAME_MANAGER._restart()
|
||||
GameManager._restart()
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user