pandemonium_demo_projects/2d/pong/logic/wall.gd

7 lines
134 B
GDScript

extends Area2D
func _on_wall_area_entered(area):
if area.name == "Ball":
#oops, ball went out of game place, reset
area.reset()