Ajout de mélodie, des murs et des notes #tropBeau #melodieLaBest #slay #lesGaufresDeMrLanoix

This commit is contained in:
E213872U 2025-01-24 13:26:08 +01:00
commit 52022128af
8 changed files with 31 additions and 2 deletions

View file

@ -2,7 +2,11 @@
importer="texture"
type="CompressedTexture2D"
<<<<<<< HEAD
uid="uid://2o4w65so8ahw"
=======
uid="uid://iwrdb61rkpsx"
>>>>>>> 9819eb73e1e97eb41a466d3202753cc9f8b5b0de
path="res://.godot/imported/cgj_default_tile.svg-6f24db072965547b576ce8b63fbe7ec8.ctex"
metadata={
"vram_texture": false

View file

@ -2,7 +2,11 @@
importer="texture"
type="CompressedTexture2D"
<<<<<<< HEAD
uid="uid://crl12jj80ttb3"
=======
uid="uid://d1d462gptgad8"
>>>>>>> 9819eb73e1e97eb41a466d3202753cc9f8b5b0de
path="res://.godot/imported/cgj_tile_1.svg-6f1497fb2775a0586cdf5be113ac6ba6.ctex"
metadata={
"vram_texture": false

View file

@ -2,7 +2,11 @@
importer="texture"
type="CompressedTexture2D"
<<<<<<< HEAD
uid="uid://drnrvixq01dqp"
=======
uid="uid://rey6oul5tla0"
>>>>>>> 9819eb73e1e97eb41a466d3202753cc9f8b5b0de
path="res://.godot/imported/cgj_tile_2.svg-1008c878b662a507cf2fef633a6dc4aa.ctex"
metadata={
"vram_texture": false

BIN
ressources/sons/flute-1.mp3 Normal file

Binary file not shown.

BIN
ressources/sons/flute-2.mp3 Normal file

Binary file not shown.

BIN
ressources/sons/flute-3.mp3 Normal file

Binary file not shown.

BIN
ressources/sons/flute-4.mp3 Normal file

Binary file not shown.

View file

@ -1,6 +1,12 @@
extends CharacterBody2D
const move_speed = 400
const acceleration = 0.25
const max_boost_speed = 800
var previous_direction = Vector2.ZERO
var boost_speed = 0
func _physics_process(delta: float) -> void:
move_and_slide()
@ -10,6 +16,17 @@ func _process(delta: float) -> void:
direction.x = Input.get_action_raw_strength("BOUGER_DROITE") - Input.get_action_raw_strength("BOUGER_GAUCHE")
direction.y = Input.get_action_raw_strength("BOUGER_BAS") - Input.get_action_raw_strength("BOUGER_HAUT")
velocity = direction * move_speed
if direction != Vector2.ZERO:
if direction.normalized() == previous_direction.normalized():
if direction.x != 0 and direction.y != 0:
boost_speed = min(boost_speed + acceleration / 8, (max_boost_speed - move_speed) / 8)
else:
boost_speed = min(boost_speed + acceleration, max_boost_speed - move_speed)
else:
boost_speed = 0
previous_direction = direction
velocity = direction * (move_speed + boost_speed)
print(velocity)
pass