adding sound to menu

This commit is contained in:
Fabio 2024-08-20 18:01:25 +02:00
parent 5a278ca062
commit d255435c93
8 changed files with 190 additions and 7 deletions

View file

@ -3,6 +3,8 @@ extends CharacterBody2D
@export var sfx : AudioStreamPlayer2D
@export var sfx_large : AudioStreamPlayer2D
@onready var animation = $AnimationPlayer
@export var speed = 340
@export var gravity = 50
var jump_count = 1
@ -58,10 +60,13 @@ func get_input(delta):
if left and right:
input_direction = 0
elif left:
animation.play("RESET")
input_direction = -1
elif right:
animation.play("RESET")
input_direction = 1
else:
animation.play("idle")
input_direction = 0
velocity.x = input_direction * speed