mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 13:30:07 +01:00
14 lines
244 B
C#
14 lines
244 B
C#
using Godot;
|
|
|
|
public class Wall : Area2D
|
|
{
|
|
public void OnWallAreaEntered(Area2D area)
|
|
{
|
|
if (area is Ball ball)
|
|
{
|
|
// Ball went off the side of the screen, reset it.
|
|
ball.Reset();
|
|
}
|
|
}
|
|
}
|