14 lines
No EOL
360 B
C#
14 lines
No EOL
360 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(FieldParams.RightFieldBoundary.X - GlobalPosition.X+FieldParams.TileWidth/2.0f, 0);
|
|
}
|
|
}
|
|
} |