Guest User

player bullet

a guest
Nov 2nd, 2023
176
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.  
  4. var direction = Vector2.RIGHT
  5. var speed = 300
  6.  
  7. func _physics_process(delta):
  8. position += direction * speed * delta
  9.  
  10.  
  11. func _on_body_entered(body):
  12. body.take_damage()
  13.  
  14.  
  15. func _on_screen_exited():
  16. queue_free()
  17.  
Add Comment
Please, Sign In to add comment