19 lines
461 B
GDScript
19 lines
461 B
GDScript
extends Area3D
|
|
|
|
@export var new_y_diff = 0.0
|
|
@export var image_path: String = "res://assets/Images/EU_AI_Act_logo_main.png"
|
|
|
|
signal battery_collected
|
|
|
|
func set_picture() -> void:
|
|
print('setting picture: ', image_path)
|
|
$Sprite3D.texture = load(image_path)
|
|
$Sprite3D.visible = true
|
|
|
|
func _on_body_entered(body: Node) -> void:
|
|
$AudioStreamPlayer.play()
|
|
await get_tree().create_timer(0.1).timeout
|
|
Global.batteries += 1
|
|
battery_collected.emit()
|
|
queue_free()
|