Wall.cs 252 B

12345678910111213
  1. using Godot;
  2. public partial class Wall : Area2D
  3. {
  4. public void OnWallAreaEntered(Area2D area)
  5. {
  6. if (area is Ball ball)
  7. {
  8. // Ball went off the side of the screen, reset it.
  9. ball.Reset();
  10. }
  11. }
  12. }