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,13 +1,13 @@
|
|||
class_name Level extends Node
|
||||
|
||||
@onready var rules = get_node("RulesComponent") as RulesComponent
|
||||
@onready var bee_spawner = get_node("BeeSpawner") as BeeSpawner
|
||||
@onready var ui_controls = get_node("UiComponent") as UIComponent
|
||||
@onready var rules : RulesComponent = get_node("RulesComponent") as RulesComponent
|
||||
@onready var bee_spawner : BeeSpawner = get_node("BeeSpawner") as BeeSpawner
|
||||
@onready var ui_controls : UIComponent = get_node("UiComponent") as UIComponent
|
||||
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
update_game_state()
|
||||
|
||||
func update_game_state():
|
||||
func update_game_state() -> void:
|
||||
GameState.required_nectar = rules.game_rules.nectar_required
|
||||
GameState.level_par = rules.game_rules.level_par
|
||||
GameState.level_number = rules.game_rules.level_number
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue