oh-my-git/scenes/drop_area.gd
Sebastian Morr 8f70770107 Fix warnings
2020-10-26 19:56:52 +01:00

19 lines
337 B
GDScript

extends Node2D
var hovered = false
func _ready():
pass
func _mouse_entered():
hovered = true
func _mouse_exited():
hovered = false
func _input(event):
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and !event.pressed and hovered:
if game.dragged_object:
game.dragged_object.dropped_on($"..")