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,17 +1,13 @@
|
|||
extends Area2D
|
||||
|
||||
@onready var bee = get_parent() as Bee
|
||||
@onready var bee : Bee = get_parent() as Bee
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
|
||||
func _on_area_entered(area:Area2D):
|
||||
func _on_area_entered(area : Area2D) -> void:
|
||||
## Check if the area entered is a flower patch
|
||||
if area.is_in_group("flowers"):
|
||||
bee.in_range_of_flowers = true
|
||||
|
||||
func _on_area_exited(area:Area2D):
|
||||
func _on_area_exited(area : Area2D) -> void:
|
||||
## Check if the area exited is a flower patch
|
||||
if area.is_in_group("flowers"):
|
||||
bee.in_range_of_flowers = false
|
||||
Loading…
Add table
Add a link
Reference in a new issue