Hi,
Issue in Lecture 100
I’m using Godot 3.1.1 and can’t get the ComputerPopup to appear.
The can_click does work and lights up the area.
extends Area2D
var can_click = false
var combination
func _ready():
$Light2D.enabled = false
func _on_Computer_body_entered(body):
can_click = true
func _on_Computer_body_exited(body):
can_click = false
$Light2D.enabled = false
func _input_event(viewport, event, shape_idx):
if Input.is_mouse_button_pressed(BUTTON_LEFT) and can_click:
$CanvasLayer/ComputerPopup.popup_centered()
$Light2D.enabled = true