16 lines
279 B
GDScript
16 lines
279 B
GDScript
extends Area2D
|
|
|
|
var vitesseBalle = 700
|
|
|
|
func _ready():
|
|
pass
|
|
|
|
func _physics_process(delta):
|
|
position += transform.x * vitesseBalle * delta
|
|
|
|
func _on_Area2D_body_entered(body):
|
|
if "Murs" in body.name:
|
|
queue_free()
|
|
if "Ennemi" in body.name:
|
|
queue_free()
|
|
body.queue_free()
|