#13 suite du developpement d'inventaire avec le rajout des ItemObjects, description sur le GUI, items d'exemple et corrections mineures

This commit was merged in pull request #35.
This commit is contained in:
2025-08-18 16:05:37 +02:00
parent d2742231e6
commit a91ca5f7f1
43 changed files with 755 additions and 90 deletions

View File

@@ -1,8 +1,19 @@
extends Area2D
class_name Interactable
@export var actions : Array[InteractableAction] = []
var available : bool = true
func interact(p : Player):
for a in actions:
a.action(p, self)
func _ready():
printerr("Abstract Interactable class used")
func interact(_p : Player) -> bool:
printerr("Interact function called on abstract Interactable class")
return false
func generate_collision(area_width : float):
var collision = CollisionShape2D.new()
var collision_shape = CircleShape2D.new()
collision_shape.radius = area_width
collision.shape = collision_shape
add_child(collision)