17 lines
279 B
GDScript3
17 lines
279 B
GDScript3
|
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()
|