diff --git a/xiaofang/Assets/Resources/JsonAsset/Role.json b/xiaofang/Assets/Resources/JsonAsset/Role.json index 4fe4a659..2864623e 100644 --- a/xiaofang/Assets/Resources/JsonAsset/Role.json +++ b/xiaofang/Assets/Resources/JsonAsset/Role.json @@ -1,182 +1,182 @@ [ { - "ID": "8000", + "ID": 8000, "Note": "主持人", "Name": "2001,1,8000|2001,2,8000|2001,6,8000", - "ActionMode": "0", - "Group": "-1", - "GroupLeader": "3", - "IsLeadingNPC": "0", + "ActionMode": 0, + "Group": -1, + "GroupLeader": 3, + "IsLeadingNPC": 0, "ICON": "ICON_312", - "WeightLimit": "-1", - "Stats": "-1", + "WeightLimit": -1, + "Stats": -1, "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b013.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8001", + "ID": 8001, "Note": "总指挥", "Name": "2001,1,8001|2001,2,8001|2001,6,8001", - "ActionMode": "2", - "Group": "-1", - "GroupLeader": "2", - "IsLeadingNPC": "0", + "ActionMode": 2, + "Group": -1, + "GroupLeader": 2, + "IsLeadingNPC": 0, "ICON": "ICON_313", - "WeightLimit": "5", + "WeightLimit": 5, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b001.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8002", + "ID": 8002, "Note": "抢险救援组", "Name": "2001,1,8002|2001,2,8002|2001,6,8002", - "ActionMode": "2", - "Group": "8003", - "GroupLeader": "0", - "IsLeadingNPC": "0", + "ActionMode": 2, + "Group": 8003, + "GroupLeader": 0, + "IsLeadingNPC": 0, "ICON": "ICON_314", - "WeightLimit": "5", + "WeightLimit": 5, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b002.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8003", + "ID": 8003, "Note": "(组长)抢险救援组", "Name": "2001,1,8003|2001,2,8003|2001,6,8003", - "ActionMode": "2", - "Group": "-1", - "GroupLeader": "1", - "IsLeadingNPC": "0", + "ActionMode": 2, + "Group": -1, + "GroupLeader": 1, + "IsLeadingNPC": 0, "ICON": "ICON_315", - "WeightLimit": "5", + "WeightLimit": 5, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b003.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8004", + "ID": 8004, "Note": "医疗救护组", "Name": "2001,1,8004|2001,2,8004|2001,6,8004", - "ActionMode": "2", - "Group": "8005", - "GroupLeader": "0", - "IsLeadingNPC": "0", + "ActionMode": 2, + "Group": 8005, + "GroupLeader": 0, + "IsLeadingNPC": 0, "ICON": "ICON_316", - "WeightLimit": "5", + "WeightLimit": 5, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b004.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8005", + "ID": 8005, "Note": "(组长)医疗救护组", "Name": "2001,1,8005|2001,2,8005|2001,6,8005", - "ActionMode": "2", - "Group": "-1", - "GroupLeader": "1", - "IsLeadingNPC": "0", + "ActionMode": 2, + "Group": -1, + "GroupLeader": 1, + "IsLeadingNPC": 0, "ICON": "ICON_317", - "WeightLimit": "5", + "WeightLimit": 5, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b005.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8006", + "ID": 8006, "Note": "疏散引导组1", - "Name": "2001,1,8005|2001,2,8005|2001,6,8999", - "ActionMode": "1", - "Group": "8001", - "GroupLeader": "0", - "IsLeadingNPC": "1", + "Name": "2001,1,8006|2001,2,8006|2001,6,8999", + "ActionMode": 1, + "Group": 8001, + "GroupLeader": 0, + "IsLeadingNPC": 1, "ICON": "ICON_318", - "WeightLimit": "-1", + "WeightLimit": -1, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b006.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8007", + "ID": 8007, "Note": "疏散引导组2", "Name": "2002,1,8007|2002,2,8007|2002,3,8999", - "ActionMode": "2", - "Group": "8001", - "GroupLeader": "0", - "IsLeadingNPC": "1", + "ActionMode": 2, + "Group": 8001, + "GroupLeader": 0, + "IsLeadingNPC": 1, "ICON": "ICON_319", - "WeightLimit": "-1", + "WeightLimit": -1, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b007.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8008", + "ID": 8008, "Note": "后勤保障组", "Name": "2001,1,8008|2001,2,8008|2001,6,8008", - "ActionMode": "2", - "Group": "8009", - "GroupLeader": "0", - "IsLeadingNPC": "0", + "ActionMode": 2, + "Group": 8009, + "GroupLeader": 0, + "IsLeadingNPC": 0, "ICON": "ICON_320", - "WeightLimit": "10", + "WeightLimit": 10, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b008.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8009", + "ID": 8009, "Note": "(组长)后勤保障组", "Name": "2001,1,8009|2001,2,8009|2001,6,8009", - "ActionMode": "2", - "Group": "-1", - "GroupLeader": "1", - "IsLeadingNPC": "0", + "ActionMode": 2, + "Group": -1, + "GroupLeader": 1, + "IsLeadingNPC": 0, "ICON": "ICON_321", - "WeightLimit": "10", + "WeightLimit": 10, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b009.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 }, { - "ID": "8010", + "ID": 8010, "Note": "搜寻组", "Name": "2001,1,8010|2001,2,8010|2001,6,8010", - "ActionMode": "2", - "Group": "8001", - "GroupLeader": "0", - "IsLeadingNPC": "0", + "ActionMode": 2, + "Group": 8001, + "GroupLeader": 0, + "IsLeadingNPC": 0, "ICON": "ICON_322", - "WeightLimit": "5", + "WeightLimit": 5, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b010.Prefeb", "ManageLevel": "1|2|3|4|5" }, { - "ID": "8011", + "ID": 8011, "Note": "学生寝室长", "Name": "2002,1,8011|2002,2,8011|2002,3,8999", - "ActionMode": "1", - "Group": "8001", - "GroupLeader": "0", - "IsLeadingNPC": "1", + "ActionMode": 1, + "Group": 8001, + "GroupLeader": 0, + "IsLeadingNPC": 1, "ICON": "ICON_323", - "WeightLimit": "-1", + "WeightLimit": -1, "Stats": "1,6.5|2,1.8|3,1|6,100", "Skills": "4001,-1|4003,202|4005,-1", "ResPath": "\\ASSETS\\b012.Prefeb", - "ManageLevel": "-1" + "ManageLevel": -1 } ] \ No newline at end of file diff --git a/xiaofang/Assets/Script/Scheduled_03/Panel.cs b/xiaofang/Assets/Script/Scheduled_03/Panel.cs index 4b5a175d..0bc3d55b 100644 --- a/xiaofang/Assets/Script/Scheduled_03/Panel.cs +++ b/xiaofang/Assets/Script/Scheduled_03/Panel.cs @@ -196,7 +196,7 @@ public class Panel : MonoBehaviour sceneItem.sceneId = npcData.ToString(); LocationData locationData= jsonReader1.GetAreaDateById(int.Parse(npcData)); sceneItem.sceneName.text = jsonReader1.SetUIText(locationData.Name); - Debug.LogError(sceneItem.sceneId); + //Debug.LogError(sceneItem.sceneId); // ÿʵĽɫӵб peopleList.Add(item); } @@ -297,6 +297,7 @@ public class Panel : MonoBehaviour //ѡְسӦ public void SetScene(int id) { + peopleList.Clear(); foreach(Transform child in sceneCount) { @@ -313,18 +314,20 @@ public class Panel : MonoBehaviour bool shouldInstantiate = true; if(npcData.Value.RoleLimit=="-1") { - break; + continue; } else { foreach (var section in roleLimitSections) { + // ,ָ¹λIDְҵIDҪ string[] roleLimits = section.Split(','); string accidentLocationId = roleLimits[0]; // ¹λID string difficultyId = roleLimits[1]; string roleId = roleLimits[2]; // ְҵID int minRequired = int.Parse(roleLimits[3]); // Ҫ +Debug.LogError("SceneId+" + selectScenePanel.idcidentId); if (accidentLocationId == selectScenePanel.idcidentId.ToString() && roleId == id.ToString() && difficultyId == selectScenePanel.difficultyId.ToString()) { GameObject item = GameObject.Instantiate(scenePrefab, sceneCount); @@ -492,6 +495,7 @@ public class Panel : MonoBehaviour selectedInfo.scene = scene; selectedInfo.sceneId= sceneItem.sceneId; isSceneSelected = true; // ѡ˳ + Debug.LogError(">>>>>>>>>>>>>>>>" + selectedInfo.sceneId); } else if (buttonText != null && buttonText.tag == Tags.duty) // ȡǩΪְϢ { @@ -510,6 +514,7 @@ public class Panel : MonoBehaviour dutyId = item.dutyId; selectedInfo.duty = duty; selectedInfo.dutyId = dutyId.ToString(); + Debug.LogError(">>>>>>>>>>>>>>>>" + selectedInfo.dutyId); } } } diff --git a/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs b/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs index c93a8267..b484f35e 100644 --- a/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs +++ b/xiaofang/Assets/Script/UI/PanelUI/EvacuationPanel.cs @@ -297,101 +297,25 @@ public class EvacuationPanel : MonoBehaviour string[] limit = npcLimit.Split(','); if (limit[0] == selectScene.scnenId.ToString()&& limit[1] == selectScene.difficultyId.ToString()) { - //GameObject sceneitem = GameObject.Instantiate(personnelPrefabs, personnelContent); - //PersonnelItem personnelItem = sceneitem.GetComponent(); - //Button button = personnelItem.transform.Find("sceneText").GetComponent