From dd2c810c5e92c18176f642b1c74c536b4d52425c Mon Sep 17 00:00:00 2001 From: lq <3298408835@qq.com> Date: Fri, 3 Jan 2025 15:06:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E4=BD=8E=E4=BA=BA=E5=91=98=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Scenes/Schedule_03.unity | 2 + xiaofang/Assets/Script/Scheduled_03/Panel.cs | 266 +++++++++--------- .../Script/UI/PanelUI/DistributionPanel.cs | 2 +- .../Script/UI/PanelUI/PersonnelPanel.cs | 9 + .../Script/UI/PanelUI/SelectScenePanel.cs | 3 - 5 files changed, 144 insertions(+), 138 deletions(-) diff --git a/xiaofang/Assets/Scenes/Schedule_03.unity b/xiaofang/Assets/Scenes/Schedule_03.unity index e99f5365..00131402 100644 --- a/xiaofang/Assets/Scenes/Schedule_03.unity +++ b/xiaofang/Assets/Scenes/Schedule_03.unity @@ -2665,6 +2665,8 @@ MonoBehaviour: sceneLable: {fileID: 5900002971020626571, guid: 297444ab6ae692b4dbcb38d34e0c5716, type: 3} content: {fileID: 788248231} closeBtn: {fileID: 349260647} + panel: {fileID: 618256462} + selectScenePanel: {fileID: 7468736064579811982} jsonReader: {fileID: 1417128757} --- !u!1 &569417021 stripped GameObject: diff --git a/xiaofang/Assets/Script/Scheduled_03/Panel.cs b/xiaofang/Assets/Script/Scheduled_03/Panel.cs index 7cc141a4..20d42b7b 100644 --- a/xiaofang/Assets/Script/Scheduled_03/Panel.cs +++ b/xiaofang/Assets/Script/Scheduled_03/Panel.cs @@ -29,25 +29,25 @@ public class SelectedInfo public class Panel : Base { [Header("组件")] - [Header("设置人员")] + [Header("设置人员")] public Button setName;//设置人员 [Header("设置职责")] public Button setDuty;//设置职责 - [Header("设置场景")] + [Header("设置场景")] public Button setScene;//设置场景 - [Header("整体安排")] + [Header("整体安排")] public Text arrangeText;//整体安排 - [Header("确认信息按钮")] + [Header("确认信息按钮")] public Button sureBtn;//确认信息按钮 [Header("最少人员要求警告")] public Button requirementsBtn; - [Header("场景的ToggleGroup")] + [Header("场景的ToggleGroup")] public ToggleGroup scenetoggleGroup;//场景的ToggleGroup - [Header("筛选输入框")] + [Header("筛选输入框")] public InputField shaixuaninputField;//筛选输入框 - [Header("画布上的射线投射器")] + [Header("画布上的射线投射器")] public GraphicRaycaster raycaster; // 画布上的射线投射器 - [Header("事件系统")] + [Header("事件系统")] public EventSystem eventSystem; // 事件系统 public ToggleGroup chooseGroup; [Header("面板选择")] @@ -60,23 +60,23 @@ public class Panel : Base [Header("物体")] - [Header("人员管理界面")] + [Header("人员管理界面")] public GameObject ManagerPanel;//人员管理界面 - [Header("人员的窗口")] + [Header("人员的窗口")] public Transform peopleCountent;//人员的窗口 - [Header("人员的预制体")] + [Header("人员的预制体")] public GameObject peoplePrefab;//人员的预制体 - [Header("物体")] + [Header("物体")] public Transform panelContent; - [Header("职责预制体")] + [Header("职责预制体")] public GameObject dutyPrefab;//职责预制体 - [Header("职责的窗口")] + [Header("职责的窗口")] public Transform dutyCount;//职责的窗口 - [Header("场景预制体")] + [Header("场景预制体")] public GameObject scenePrefab;//场景预制体 - [Header("存放场景预制体")] + [Header("存放场景预制体")] public Transform sceneCount;//存放场景预制体的地方 - [Header("人员管理面板")] + [Header("人员管理面板")] public GameObject ManagerPanelPrefab; // 预制体,包含人员管理面板 [Header("最低配置面板")] public GameObject requirementsPrefab; // 预制体,最低配置面板 @@ -101,7 +101,7 @@ public class Panel : Base public SelectScenePanel selectScenePanel; public DatePanel datePanel; public WarningPopPanel warningPopPanel; - //public RequirementPanel requirementPanel; + public RequirementPanel requirementPanel; private bool isPersonSelected = false; // 标志是否选择了人员 private bool isDutySelected = false; // 标志是否选择了职责 @@ -126,34 +126,34 @@ public class Panel : Base //SetInputFile(); } //==================================================================动态加载======================================================= - //动态加载人员 + //动态加载人员 public async void DynamicLoadingPeople() { - for (int i = 0; i < 10; i++) - { - GameObject item = GameObject.Instantiate(peoplePrefab, peopleCountent); - PeopleItem peopleItem = item.GetComponent(); - peopleItem.nameText.text = "角色1"; - peopleItem.peopleId = "0"; - Button peoplebutton = item.transform.Find("TextBtn").GetComponent