Ajoute Instrument + jouer melodie

This commit is contained in:
Elouan 2025-01-24 13:57:08 +01:00
parent 5b26e074e4
commit 4ba84426d6
16 changed files with 207 additions and 29 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,6 @@ func _process(delta: float) -> void:
previous_direction = direction
velocity = direction * (move_speed + boost_speed)
print(velocity)
pass
if Input.is_action_just_pressed("JOUER_MUSIQUE"):
flute.jouer_melodie(position)