diff --git a/xiaofang/Assets/Script/JSONReader/JSONReader.cs b/xiaofang/Assets/Script/JSONReader/JSONReader.cs index 558415f0..f596c133 100644 --- a/xiaofang/Assets/Script/JSONReader/JSONReader.cs +++ b/xiaofang/Assets/Script/JSONReader/JSONReader.cs @@ -5,8 +5,6 @@ using Google.Protobuf.WellKnownTypes; public class JSONReader : MonoBehaviour { - - // 让 Unity 编辑器能够分别拖入两个不同的 JSON 文件 public TextAsset npcJsonFile; // 用来加载 NPC 数据 public TextAsset locationJsonFile; // 用来加载 Location 数据 diff --git a/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs b/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs index 7a94dc36..701b860e 100644 --- a/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs +++ b/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs @@ -88,7 +88,6 @@ public class EvacuationPanel : MonoBehaviour //上传数据 public void totalSubmit() { - Debug.Log(createTemplateInfo.Instance.auth_CreateTemplate + "==============="); NpcList nPC = new NpcList(); nPC.npcId = npcType; nPC.areaId = roleid; @@ -366,11 +365,16 @@ public class EvacuationPanel : MonoBehaviour foreach (var kvp in personnelItemsDict) { - if (kvp.Value.personnelImage.gameObject.activeSelf) // 检查 gameObject 是否显示 + if (kvp.Value.personnelImage!=null&&kvp.Value.personnelImage.gameObject.activeSelf) // 检查 gameObject 是否显示 { canRedistribute = true; break; } + else + { + canRedistribute = false; + break; + } } // 设置重新分配按钮的交互状态 redistributeBtn.interactable = canRedistribute; diff --git a/xiaofang/Assets/yhj/scripts/JueseChoicePop.cs b/xiaofang/Assets/yhj/scripts/JueseChoicePop.cs index 72be6094..d63dc894 100644 --- a/xiaofang/Assets/yhj/scripts/JueseChoicePop.cs +++ b/xiaofang/Assets/yhj/scripts/JueseChoicePop.cs @@ -80,8 +80,6 @@ public class JueseChoicePop : MonoBehaviour { foreach (var selectedInfo in pair.Value) { - Debug.Log("+++++++++++++++++++++++"+ int.Parse(firstElement)); - Debug.Log("-------------------------"+ selectedInfo.dutyId); if (selectedInfo.dutyId == firstElement) { GameObject item = GameObject.Instantiate(classmatePrefab, content); @@ -95,9 +93,6 @@ public class JueseChoicePop : MonoBehaviour } } - - - public void SetClassItem(ClassItem classItem) { this.classItem = classItem;