Refactor: Added explicit typing and void return types
- Introduced explicit typing to variables and functions across multiple scripts for better code clarity. - Specified 'void' as the return type for functions that do not return a value. - Removed redundant code in some scripts.
This commit is contained in:
parent
a62cd6018e
commit
2a9e78b52e
37 changed files with 216 additions and 248 deletions
|
|
@ -1,15 +1,15 @@
|
|||
extends Control
|
||||
|
||||
@onready var main_menu_button = get_node("%MainMenu")
|
||||
@onready var main_menu_button : Button = get_node("%MainMenu")
|
||||
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
visible = false
|
||||
main_menu_button.connect("pressed", Callable(self, "on_main_menu_pressed"))
|
||||
|
||||
func _process(_delta):
|
||||
func _process(_delta : float) -> void:
|
||||
if GameState.game_over == true:
|
||||
visible = true
|
||||
|
||||
func on_main_menu_pressed():
|
||||
func on_main_menu_pressed() -> void:
|
||||
GameState.reset()
|
||||
SceneMgr.load_scene("MAINMENU")
|
||||
Loading…
Add table
Add a link
Reference in a new issue