newlon/scripts/components/plants/PlantEyesightLimiter.cs
2025-06-26 20:18:19 +05:00

14 lines
No EOL
329 B
C#

using Godot;
namespace Newlon.Components.Plants;
public partial class PlantEyesightLimiter : CollisionShape2D
{
public override void _Process(double delta)
{
if (Shape is SegmentShape2D segment)
{
segment.B = new Vector2(Utility.RightFieldBoundary.X - GlobalPosition.X, 0);
}
}
}