21 lines
502 B
GDScript
21 lines
502 B
GDScript
extends Area2D
|
|
|
|
@export var Destination : String
|
|
@export var DestinationLabel : Label
|
|
|
|
@export var InteractibleManager : Node
|
|
|
|
var Player : Node2D
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
DestinationLabel.text = Destination
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
if Input.is_action_pressed("interact") and InteractibleManager.selected:
|
|
Player.ActiveContract = Destination
|