Files
godot-demo-projects/mono/monkey_pong/CeilingFloor.cs
2017-10-31 16:22:07 +01:00

17 lines
277 B
C#

using Godot;
using System;
public class CeilingFloor : Area2D
{
[Export]
private int yDirection = 1;
public void OnAreaEntered(Area2D area)
{
if (area is Ball ball)
{
ball.direction += new Vector2(0, yDirection);
}
}
}