class_name Bullet extends Area2D
var speed = 700

signal bulletHit(body, bullet)

func setSpeed(value):
	speed = value
	
func _physics_process(delta: float) -> void:
		position += transform.x * speed * delta


func _on_body_entered(body: Node2D) -> void:
	if not body is Player:
		print ("bullet hit! ow!" )
		bulletHit.emit(body, self)
