ajout de la porte et équilibrage des mutations

This commit is contained in:
2026-03-06 18:15:10 +01:00
parent 263f6c42a7
commit 2cd16acd6a
92 changed files with 1420 additions and 582 deletions

View File

@@ -3,9 +3,14 @@ extends Interactable
class_name Door
@export var to_scene_id = ""
@export var icon : Texture : set = set_icon
func _ready():
modulate = Color.WHITE if available else Color.RED
if available:
%AnimatedSprite2D.play("opened")
else:
%AnimatedSprite2D.play("closed")
set_icon()
func interact(_p : Player) -> bool:
if available and to_scene_id:
@@ -16,4 +21,14 @@ func interact(_p : Player) -> bool:
func set_available(v : bool):
available = v
modulate = Color.WHITE if available else Color.RED
if is_node_ready():
if available:
AudioManager.play_sfx("DoorOpen")
%AnimatedSprite2D.play("open")
else:
%AnimatedSprite2D.play("close")
func set_icon(i: Texture = icon):
icon = i
if is_node_ready():
%Icon.texture = icon