Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Zero323 |
Okay, now it seems work.
I put two area2D, one for the joystick handle and other for the button
then, in the area2D button I connect a signal of type “area entered” and create this code:
extends Area2D
signal hit
var screen_size
func _ready():
screen_size = get_viewport_rect().size
func _on_forward_button_area_entered(area):
print(“activated”)
emit_signal(“hit”)
Now if the handle touch the button prints “activated”
How can I use this to activate the “dash” action that has the button?