#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:
@@ -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)
|
||||
Reference in New Issue
Block a user