Guest User

projectile

a guest
Jul 29th, 2023
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. extends Area2D
  2.  
  3. var direction : Vector2 = Vector2.UP
  4. var speed : float = 300
  5.  
  6. func _physics_process(delta):
  7. position += direction * speed * delta
  8.  
  9. func _on_exited():
  10. queue_free()
  11.  
  12.  
  13. func _on_body_entered(body):
  14. body.queue_free()
  15.  
Advertisement
Add Comment
Please, Sign In to add comment