2025-09-17 15:10:13 +02:00
|
|
|
extends ActiveItem
|
2025-10-02 17:59:23 +02:00
|
|
|
@export var cooldown = 0.3
|
2025-09-17 15:10:13 +02:00
|
|
|
@export var arrow_scene : PackedScene
|
|
|
|
|
|
2025-09-17 17:18:28 +02:00
|
|
|
func actually_collect():
|
|
|
|
|
player.set_cooldown(cooldown)
|
2025-09-17 16:41:29 +02:00
|
|
|
|
2025-09-17 15:10:13 +02:00
|
|
|
|
|
|
|
|
func activate():
|
2025-09-17 16:41:29 +02:00
|
|
|
player.activate_cooldown()
|
2025-09-17 15:10:13 +02:00
|
|
|
var arrow : Area2D = arrow_scene.instantiate()
|
|
|
|
|
get_tree().get_root().add_child(arrow)
|
|
|
|
|
arrow.position = player.position
|
|
|
|
|
arrow.rotation = player.rotation
|
|
|
|
|
arrow.direction = player.earth_aligner.global_from_local(Vector2(player.facing, 0))
|
2025-09-20 01:15:57 +02:00
|
|
|
if(player.facing == -1):
|
|
|
|
|
arrow.get_node("Sprite2D").scale.x = - arrow.get_node("Sprite2D").scale.x
|
2025-09-19 14:42:16 +02:00
|
|
|
$SoundBowRelease.play()
|