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
Mylloon deb9f6f1f7
* update filter
* add winning screen
2023-02-26 19:09:57 +01:00

16 lines
543 B
GDScript
Executable file

extends Area2D
onready var screen = $"../Screen"
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
sprite.modulate = Color(0.66, 0.51, 0.85) # shade
var progress_screen = screen.get_node("Window2")
if progress_screen.visible:
progress_screen.play()
screen.get_node("Button2").etat = true