小改
This commit is contained in:
parent
4cdbf62b8d
commit
4472c138f0
@ -260,7 +260,6 @@ public class JSONReader : MonoBehaviour
|
||||
return null; // 如果没有找到符合条件的语言数据,返回 null
|
||||
}
|
||||
|
||||
|
||||
//获取任务
|
||||
public Task_ GetTaskByID(int id)
|
||||
{
|
||||
|
@ -311,7 +311,12 @@ public class Panel : MonoBehaviour
|
||||
// 按“|”分隔不同的角色限制部分
|
||||
string[] roleLimitSections = npcData.Value.RoleLimit.Split('|');
|
||||
bool shouldInstantiate = true;
|
||||
// 遍历每个角色限制部分
|
||||
if(npcData.Value.RoleLimit=="-1")
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var section in roleLimitSections)
|
||||
{
|
||||
// 按“,”分隔出事故位置ID、职业ID和最低要求人数
|
||||
@ -330,7 +335,7 @@ public class Panel : MonoBehaviour
|
||||
string difficultyId = roleLimits[1];
|
||||
string roleId = roleLimits[2]; // 职业ID
|
||||
int minRequired = int.Parse(roleLimits[3]); // 最低要求人数
|
||||
if (accidentLocationId == selectScenePanel.idcidentId.ToString() && roleId == id.ToString()&&difficultyId==selectScenePanel.difficultyId.ToString())
|
||||
if (accidentLocationId == selectScenePanel.idcidentId.ToString() && roleId == id.ToString() && difficultyId == selectScenePanel.difficultyId.ToString())
|
||||
{
|
||||
GameObject item = GameObject.Instantiate<GameObject>(scenePrefab, sceneCount);
|
||||
SceneItem sceneItem = item.GetComponent<SceneItem>();
|
||||
@ -357,6 +362,9 @@ public class Panel : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
// 遍历每个角色限制部分
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,6 +273,38 @@ public class EvacuationPanel : MonoBehaviour
|
||||
return nonZeroAreas;
|
||||
}
|
||||
|
||||
//设置左侧场景显示2.0
|
||||
public void SetScene()
|
||||
{
|
||||
// 清空现有的UI项
|
||||
foreach (Transform child in personnelContent)
|
||||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
// 清空人员列表
|
||||
personnelItems.Clear();
|
||||
foreach (var item in js.locationDictionary)
|
||||
{
|
||||
if(item.Value.NpcRatio=="-1")
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] npcratio = item.Value.NpcRatio.Split('|');
|
||||
foreach(var npcLimit in npcratio)
|
||||
{
|
||||
string[] limit = npcLimit.Split(',');
|
||||
if (limit[0] == selectScene.scnenId.ToString()&& limit[1] == selectScene.difficultyId.ToString())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//ÉèÖÃ×ó²à³¡¾°ÏÔʾ
|
||||
public void SetPersonnel()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user