Advertisement
otorp2

area2d connect call func in enemy

Apr 13th, 2016
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. extends Area2D
  2.  
  3.  
  4. var x = 0
  5. onready var enemy_node = get_node("../enemy")
  6.  
  7. func _ready():
  8. set_process(true)
  9. connect('area_enter',enemy_node,'_on_area_enter')
  10.  
  11. print(enemy_node.get_pos())
  12.  
  13.  
  14. pass
  15.  
  16. func _process(delta):
  17. x += 1
  18. set_pos(Vector2(x,50))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement