This repository has been archived on 2022-03-31. You can view files and clone it, but cannot push or open issues or pull requests.
Tyra/scripts/Balle.gd

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()