diff --git a/xiaofang/Assets/Script/Scheduled_03/Panel.cs b/xiaofang/Assets/Script/Scheduled_03/Panel.cs index b3f1a2c5..a8e9da4e 100644 --- a/xiaofang/Assets/Script/Scheduled_03/Panel.cs +++ b/xiaofang/Assets/Script/Scheduled_03/Panel.cs @@ -44,20 +44,6 @@ public class Panel : MonoBehaviour SetText(); } - public void SetName() - { - - } - - public void SetDuty() - { - - } - - public void SetScene() - { - - } //处理点击选择剧本按钮 @@ -108,7 +94,7 @@ public class Panel : MonoBehaviour - + //获取鼠标点击位置的信息 public void GetData() { ManagerPanel managerPanel = new ManagerPanel(); @@ -125,7 +111,7 @@ public class Panel : MonoBehaviour // 创建 PointerEventData 来记录点击事件的数据 PointerEventData pointerData = new PointerEventData(eventSystem); - pointerData.position = Input.mousePosition; + pointerData.position = Input.mousePosition;//获取鼠标点击的位置 // 用于存储射线检测的结果 List results = new List(); @@ -142,13 +128,13 @@ public class Panel : MonoBehaviour if (clickedButton != null) { Text buttonText = clickedButton.GetComponentInChildren(); - if (buttonText != null && buttonText.tag == Tags.people) + if (buttonText != null && buttonText.tag == Tags.people)//这里可以获取标签为人员的信息 { name = buttonText.text; Debug.Log(name); } - else if (buttonText != null && buttonText.tag == Tags.scene) + else if (buttonText != null && buttonText.tag == Tags.scene)//这里可以获取标签为场景的信息 { //PlateInfo plateInfo = new PlateInfo(); scene = buttonText.text; @@ -157,7 +143,7 @@ public class Panel : MonoBehaviour //plateInfo.plateinfoText.text = scene; Debug.Log(scene); } - else if (buttonText != null && buttonText.tag == Tags.duty) + else if (buttonText != null && buttonText.tag == Tags.duty)//这里可以获取标签为职责的信息 { duty = buttonText.text; diff --git a/xiaofang/Assets/Script/Scheduled_03/Tags.cs b/xiaofang/Assets/Script/Scheduled_03/Tags.cs index eee90674..bbe39081 100644 --- a/xiaofang/Assets/Script/Scheduled_03/Tags.cs +++ b/xiaofang/Assets/Script/Scheduled_03/Tags.cs @@ -8,3 +8,5 @@ public class Tags public const string duty = "Duty"; public const string scene = "Scene"; } + +