20 lines
479 B
C#
20 lines
479 B
C#
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
public class PhysicCable : MonoBehaviour
|
|
{
|
|
[FormerlySerializedAs("StartTranform")] public Transform startTransform;
|
|
|
|
public PhysicLineSegment physicLine;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
physicLine = transform.GetComponent<PhysicLineSegment>();
|
|
}
|
|
|
|
public void Init(Vector3 endPos)
|
|
{
|
|
physicLine.Initialize(startTransform.position, endPos);
|
|
}
|
|
} |