Cleaned up a few inconsistencies in pickup behaviours.

This commit is contained in:
Henry Faber 2026-07-06 14:10:14 +01:00
parent 935b61bd3b
commit 92463f4465
3 changed files with 22 additions and 11 deletions

View file

@ -20,9 +20,6 @@ class_name PickupBehavior extends Resource
## Optional fade-in duration (0 = no fade).
@export var fade_in_duration: float = 0.0
## Optional fade-out duration when the pickup is about to be collected
## (used by controller; 0 = no fade).
@export var fade_out_duration: float = 0.0
var _elapsed: float = 0.0

View file

@ -40,8 +40,9 @@ enum DriftType {
## Phase offset in radians — randomize per-instance for variety.
@export var phase_offset: float = 0.0
var _initial_x: float = 0.0
var _elapsed: float = 0.0
func reset(initial_position: Vector2) -> void:
_initial_x = initial_position.x
func start() -> void:
## Reset drift state when a new pickup is spawned.
_elapsed = 0.0