extends KinematicBody2D


var ball_speed = 100
var direction = Vector2(1,1)
var pdl1_speed = 100

func _physics_process(delta):
	
	var velocity = pdl1_speed * direction * delta
	var collision = move_and_collide(velocity)
	
	if collision != null:
		
		direction = direction.bounce(collision.normal)

func _on_player_paddle_sent_speed(paddle_speed) -> void:
	pdl1_speed = paddle_speed
	print("Signal connected")
