地区-1判断
This commit is contained in:
parent
033f1f00b1
commit
161b95deda
@ -321,16 +321,6 @@ public class Panel : MonoBehaviour
|
||||
{
|
||||
// 按“,”分隔出事故位置ID、职业ID和最低要求人数
|
||||
string[] roleLimits = section.Split(',');
|
||||
if (section.Contains("-1"))
|
||||
{
|
||||
if (roleLimits[0] == "-1")
|
||||
{
|
||||
shouldInstantiate = false; // 不实例化该NPC
|
||||
break; // 跳出循环,直接处理下一个NPC
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string accidentLocationId = roleLimits[0]; // 事故位置ID
|
||||
string difficultyId = roleLimits[1];
|
||||
string roleId = roleLimits[2]; // 职业ID
|
||||
@ -361,7 +351,6 @@ public class Panel : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 遍历每个角色限制部分
|
||||
|
||||
}
|
||||
|
@ -297,7 +297,48 @@ 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<PersonnelItem>();
|
||||
//Button button = personnelItem.transform.Find("sceneText").GetComponent<Button>();
|
||||
|
||||
//personnelItem.sceneText.text = sceneEntry.Key;
|
||||
//personnelItem.sceneId = area.ID;
|
||||
//personnelItem.Num = 1; // 设置初始值为 1
|
||||
//// 点击事件监听
|
||||
//button.onClick.AddListener(() =>
|
||||
//{
|
||||
// // 标记当前选择的区域
|
||||
// OnSceneItemClicked(item, Color.yellow, selectedScene);
|
||||
// // 如果被点击的区域已经有人员
|
||||
// if (personnelItem.NpcNum > 0)
|
||||
// {
|
||||
// redistributeBtn.onClick.AddListener(() => {
|
||||
// // 清除选定区域的人员数据
|
||||
// RedistributeLogic(personnelItem.sceneId, personnelItem.NpcNum);
|
||||
// });
|
||||
// }
|
||||
// // 清空现有场景下的所有人员UI
|
||||
// foreach (Transform child in sceneCount)
|
||||
// {
|
||||
// Destroy(child.gameObject);
|
||||
// }
|
||||
// // 执行后续的场景级别配置
|
||||
// LocationData locationData = js.GetAreaDateById(personnelItem.sceneId);
|
||||
// if (locationData.Level.ToString() != "0")
|
||||
// {
|
||||
// GameObject levelItem = GameObject.Instantiate(scenePrefab, sceneCount);
|
||||
// Button levelBtn = levelItem.transform.Find("chooseBtn2").GetComponent<Button>();
|
||||
// levelBtn.onClick.AddListener(() =>
|
||||
// {
|
||||
// JueseChoicePop jueseChoicePop = jueseChoicePanel.GetComponent<JueseChoicePop>();
|
||||
// jueseChoicePop.SetClass(personnelItem.sceneId);
|
||||
// jueseChoicePanel.gameObject.SetActive(true);
|
||||
// });
|
||||
// ClassItem classItem = levelItem.GetComponent<ClassItem>();
|
||||
// classItem.classname.text = locationData.Level.ToString();
|
||||
// }
|
||||
//});
|
||||
//personnelItems.Add(personnelItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user