JanGodotGame/scripts/bullet.gd

15 lines
268 B
GDScript3
Raw Normal View History

2025-01-20 02:04:07 +00:00
extends Area2D
@export var speed := 700
signal hit(bullet, body)
func set_speed(speedval):
speed = speedval
func _physics_process(delta):
position += transform.x * speed * delta
func _on_body_entered(body):
print ("Hit a thing") # Replace with function body.