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
|
|
@ -2,11 +2,11 @@
|
|||
extends Node2D
|
||||
class_name VegetablePatch
|
||||
|
||||
@onready var death_box = $DeathBox
|
||||
@onready var death_box : Area2D = $DeathBox
|
||||
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
death_box.connect("body_entered", Callable(self, "_on_body_entered"))
|
||||
|
||||
func _on_body_entered(area):
|
||||
func _on_body_entered(area : Bee) -> void:
|
||||
if area.is_in_group("bee"):
|
||||
area.die()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue