2024-02-02 21:03:44 +01:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
[System.Serializable]
|
|
|
|
public class Stick
|
|
|
|
{
|
|
|
|
public Point A, B;
|
2024-02-03 00:15:07 +01:00
|
|
|
public float desiredLength;
|
2024-02-02 21:03:44 +01:00
|
|
|
public bool dead;
|
|
|
|
|
|
|
|
public Stick(Point pointA, Point pointB)
|
|
|
|
{
|
|
|
|
this.A = pointA;
|
|
|
|
this.B = pointB;
|
2024-02-03 00:15:07 +01:00
|
|
|
desiredLength = Vector2.Distance(pointA.position, pointB.position);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Stick(Point pointA, Point pointB, float desiredLenght)
|
|
|
|
{
|
|
|
|
this.A = pointA;
|
|
|
|
this.B = pointB;
|
|
|
|
this.desiredLength = desiredLenght;
|
2024-02-02 21:03:44 +01:00
|
|
|
}
|
|
|
|
}
|