fgm24/Assets/Scripts/Rope/Stick.cs

23 lines
499 B
C#

using UnityEngine;
[System.Serializable]
public class Stick
{
public Point A, B;
public float desiredLength;
public bool dead;
public Stick(Point pointA, Point pointB)
{
this.A = pointA;
this.B = pointB;
desiredLength = Vector2.Distance(pointA.position, pointB.position);
}
public Stick(Point pointA, Point pointB, float desiredLenght)
{
this.A = pointA;
this.B = pointB;
this.desiredLength = desiredLenght;
}
}