<feat> TCP 좌표 패널 표기
This commit is contained in:
@@ -52,6 +52,7 @@ public class ProgramView : MonoBehaviour, IProgramView
|
||||
public event Action OnSaveClicked;
|
||||
public event Action OnAddPointClicked;
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
loadProgramButton.onClick.AddListener(() => OnLoadProgramListRequested?.Invoke());
|
||||
|
||||
33
Assets/Scripts/View/TCPView.cs
Normal file
33
Assets/Scripts/View/TCPView.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
|
||||
public class TCPView : MonoBehaviour
|
||||
{
|
||||
public event Action OnTCPupdateRequested;
|
||||
|
||||
// --- TCP ÁÂÇ¥µé ---
|
||||
[SerializeField] private TextMeshProUGUI x;
|
||||
[SerializeField] private TextMeshProUGUI Y;
|
||||
[SerializeField] private TextMeshProUGUI Z;
|
||||
[SerializeField] private TextMeshProUGUI Rx;
|
||||
[SerializeField] private TextMeshProUGUI Ry;
|
||||
[SerializeField] private TextMeshProUGUI Rz;
|
||||
|
||||
void Update()
|
||||
{
|
||||
OnTCPupdateRequested?.Invoke();
|
||||
}
|
||||
|
||||
public void SetCoordinates(RobotData data)
|
||||
{
|
||||
if (data == null) return;
|
||||
|
||||
x.text = data.x.ToString("F2");
|
||||
Y.text = data.y.ToString("F2");
|
||||
Z.text = data.z.ToString("F2");
|
||||
Rx.text = data.rx.ToString("F2");
|
||||
Ry.text = data.ry.ToString("F2");
|
||||
Rz.text = data.rz.ToString("F2");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/View/TCPView.cs.meta
Normal file
2
Assets/Scripts/View/TCPView.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6f5682d5897289846962ca66ba85af5a
|
||||
Reference in New Issue
Block a user