This repository has been archived on 2023-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
Boups/Elements/Scripts/Directory.gd

13 lines
390 B
GDScript3
Raw Normal View History

extends Area2D
onready var screen = $"../Screen"
2023-02-26 13:52:50 +01:00
onready var sprite = $"../Sprite"
func _on_Area2D_input_event(_viewport: Node, event: InputEvent, _shape_idx: int) -> void:
if event is InputEventMouseButton:
event = event as InputEventMouseButton
if event.pressed and event.button_index == BUTTON_LEFT:
screen.visible = true
2023-02-26 13:52:50 +01:00
sprite.modulate = Color(0.66, 0.51, 0.85) # shade