20 lines
415 B
C#
20 lines
415 B
C#
|
|
using Godot;
|
||
|
|
|
||
|
|
namespace Chessistics.Scripts.Pieces;
|
||
|
|
|
||
|
|
public partial class TrajectView : Line2D
|
||
|
|
{
|
||
|
|
public int PieceId { get; private set; }
|
||
|
|
|
||
|
|
public void Setup(int pieceId, Vector2 from, Vector2 to, Color color)
|
||
|
|
{
|
||
|
|
PieceId = pieceId;
|
||
|
|
Width = 3f;
|
||
|
|
DefaultColor = new Color(color, 0.5f);
|
||
|
|
ClearPoints();
|
||
|
|
AddPoint(from);
|
||
|
|
AddPoint(to);
|
||
|
|
ZIndex = -1;
|
||
|
|
}
|
||
|
|
}
|