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,13 +2,13 @@ extends State
|
|||
class_name BeeGathering
|
||||
|
||||
@export var animator : AnimationPlayer
|
||||
@onready var bee = get_parent().get_parent() as Bee # I think this is bad but I dont care it works
|
||||
@onready var bee : Bee= get_parent().get_parent() as Bee # I think this is bad but I dont care it works
|
||||
|
||||
var time_at_patch : float = 0.0
|
||||
|
||||
var target : Vector2 = Vector2.ZERO
|
||||
|
||||
func enter(_msg := {}):
|
||||
func enter(_msg : Dictionary = {}) -> void:
|
||||
bee.just_gathering = true
|
||||
|
||||
Log.pr("Gathering now...")
|
||||
|
|
@ -16,7 +16,7 @@ func enter(_msg := {}):
|
|||
randomize()
|
||||
target = bee.get_global_position() + Vector2(randi_range(-100, 100), randi_range(-100, 100))
|
||||
|
||||
func update(_delta : float):
|
||||
func update(_delta : float) -> void:
|
||||
|
||||
if bee.in_range_of_flowers:
|
||||
#animator.play("Gathering")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue