Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Area2D
- var x = 0
- func _ready():
- set_process(true)
- connect('area_enter',self,'_on_area_enter')
- var enemy_node = get_node("../enemy")
- print(enemy_node.get_pos())
- pass
- func _process(delta):
- x += 1
- set_pos(Vector2(x,50))
- func _on_area_enter( area ):
- print("hit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement