diff --git a/xiaofang/Assets/Script/UI/PanelUI/DatePanel.cs b/xiaofang/Assets/Script/UI/PanelUI/DatePanel.cs index 68fb1ace..ca43ed5e 100644 --- a/xiaofang/Assets/Script/UI/PanelUI/DatePanel.cs +++ b/xiaofang/Assets/Script/UI/PanelUI/DatePanel.cs @@ -1,3 +1,4 @@ +using JetBrains.Annotations; using System.Collections; using System.Collections.Generic; using TMPro; @@ -19,6 +20,7 @@ public class DatePanel : MonoBehaviour public Text submitText; public Text inputText; public Text dataText; + public int placeId; // Start is called before the first frame update void Start() { @@ -44,7 +46,7 @@ public class DatePanel : MonoBehaviour //提交按钮 public void OnClickSubmitPanel() { - createTemplateInfo.Instance.auth_CreateTemplate.subjectId = PlaceText.text; + createTemplateInfo.Instance.auth_CreateTemplate.subjectId = placeId.ToString(); if (preservationToggle.isOn==true) { submitPanel.gameObject.SetActive(true); diff --git a/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs b/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs index 623a5444..3df9768d 100644 --- a/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs +++ b/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs @@ -59,19 +59,12 @@ public class EvacuationPanel : MonoBehaviour public void totalSubmit() { - Debug.Log("----------------->>>>>>>>>>>" + createTemplateInfo.Instance.auth_CreateTemplate.npcList==null); - foreach(var item in createTemplateInfo.Instance.auth_CreateTemplate.npcList) - { - item.userId = npcType; - item.roleId = roleid; - } - - foreach(var item in createTemplateInfo.Instance.auth_CreateTemplate.playerList) - { - - } - - + Debug.Log(createTemplateInfo.Instance.auth_CreateTemplate + "==============="); + NpcList nPC = new NpcList(); + nPC.userId = npcType; + nPC.roleId = roleid; + createTemplateInfo.Instance.auth_CreateTemplate.npcList = new List(); + createTemplateInfo.Instance.auth_CreateTemplate.npcList.Add(nPC); } public void SetNpcType() diff --git a/xiaofang/Assets/Script/UI/PanelUI/SelectScenePanel.cs b/xiaofang/Assets/Script/UI/PanelUI/SelectScenePanel.cs index 53b5921d..01dd2221 100644 --- a/xiaofang/Assets/Script/UI/PanelUI/SelectScenePanel.cs +++ b/xiaofang/Assets/Script/UI/PanelUI/SelectScenePanel.cs @@ -183,6 +183,7 @@ public class SelectScenePanel : MonoBehaviour { this.idcidentName = item.incidentText.text; this.idcidentId = item.incidentID; + datePanel.placeId = item.incidentID; string[] difficulty = eventData.Value.Difficulty.Split('|'); // 确保difficultyList和difficulty的长度匹配