ajout intrument

This commit is contained in:
Elouan 2025-01-24 14:27:04 +01:00
parent 84f3b91978
commit 5ee577d733
11 changed files with 328 additions and 1 deletions

View file

@ -6,6 +6,11 @@ const max_boost_speed = 800
var previous_direction = Vector2.ZERO
var boost_speed = 0
var flute = null
func _ready() -> void:
flute = load("res://Instrument/Flute.gd").new()
flute._init()
func _physics_process(delta: float) -> void:
@ -28,5 +33,7 @@ func _process(delta: float) -> void:
previous_direction = direction
velocity = direction * (move_speed + boost_speed)
print(velocity)
if Input.is_action_just_pressed("JOUER_MUSIQUE"):
flute.jouer_melodie(position)
pass