extends AnimatedSprite2D var time = 0.0 @export var float_str = 10.0 @export var float_time = 2.0 @export var float_offset = -12.0 # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: time += delta # Calculate the new Y position using a sine wave position.y = sin(time * float_time) * float_str + float_offset queue_redraw() func switch_mask(new : Types.mask_types): $MeleeMask.visible = false $RangedMask.visible = false $SpitMask.visible = false if (new == Types.mask_types.Melee): $MeleeMask.visible = true elif (new == Types.mask_types.Ranged): $RangedMask.visible = true elif (new == Types.mask_types.Spit): $SpitMask.visible = true