界面隐藏
This commit is contained in:
parent
307c28637b
commit
96ba512839
@ -641,7 +641,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 560.5, y: -44}
|
||||
m_AnchoredPosition: {x: 560.5, y: -109}
|
||||
m_SizeDelta: {x: 1121, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5900002971599260725
|
||||
|
@ -2253,6 +2253,11 @@ MonoBehaviour:
|
||||
jsonReader1: {fileID: 1417128757}
|
||||
selectScenePanel: {fileID: 7468736064579811982}
|
||||
datePanel: {fileID: 468742199}
|
||||
--- !u!1 &621287106 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 51007377463830338, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
|
||||
m_PrefabInstance: {fileID: 1799705458}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &625672672
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -10132,6 +10137,14 @@ PrefabInstance:
|
||||
propertyPath: jsonReader
|
||||
value:
|
||||
objectReference: {fileID: 1417128757}
|
||||
- target: {fileID: 2102021661377337229, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
|
||||
propertyPath: sceneCount
|
||||
value:
|
||||
objectReference: {fileID: 621287106}
|
||||
- target: {fileID: 2102021661377337229, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
|
||||
propertyPath: scenePrefab
|
||||
value:
|
||||
objectReference: {fileID: 6833246911785287183, guid: eec456cfeada31d4b84c2ba45b21163e, type: 3}
|
||||
- target: {fileID: 2102021661377337229, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
|
||||
propertyPath: selectScene
|
||||
value:
|
||||
|
@ -10174,7 +10174,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4764228630805767484, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4764228630805767485, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
|
@ -18,7 +18,9 @@ public class EvacuationPanel : MonoBehaviour
|
||||
public Panel panel;
|
||||
public GameObject personnelPrefabs;
|
||||
public GameObject classPrefab;
|
||||
public GameObject classCount;
|
||||
public GameObject classCount;//
|
||||
public GameObject scenePrefab;//区域预制体
|
||||
public GameObject sceneCount;//区域预制体的容器
|
||||
public Transform content;
|
||||
public Text topText;
|
||||
private GameObject selectedScene = null;//当前选中场景
|
||||
@ -319,7 +321,7 @@ public class EvacuationPanel : MonoBehaviour
|
||||
button.onClick.AddListener(() =>
|
||||
{
|
||||
OnSceneItemClicked(item, Color.yellow, selectedScene);
|
||||
|
||||
LoadManagedArea(selectScene.difficultyId, personnelItem.sceneId);
|
||||
});
|
||||
//Debug.Log("New PersonnelItem created. SceneId: " + personnelItem.sceneId + ", Num: " + personnelItem.Num);
|
||||
personnelItems.Add(personnelItem);
|
||||
@ -353,6 +355,7 @@ public class EvacuationPanel : MonoBehaviour
|
||||
// 调试输出
|
||||
Debug.Log($"Redistribute button is {(canRedistribute ? "enabled" : "disabled")}");
|
||||
}
|
||||
|
||||
//判断输入框的数字是否大于1
|
||||
void CheckInput(string input)
|
||||
{
|
||||
@ -367,6 +370,8 @@ public class EvacuationPanel : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Npc数量设置按钮置灰设置
|
||||
public void Countsubmit()
|
||||
{
|
||||
//按钮置灰
|
||||
@ -493,4 +498,29 @@ public class EvacuationPanel : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//动态加载分管区域预制体
|
||||
public void LoadManagedArea(int targetKey,int sceneId)
|
||||
{
|
||||
// 确保字典中有数据
|
||||
if (selectScene.difficultyToRoles.Count == 0)
|
||||
{
|
||||
Debug.Log("The dictionary is empty.");
|
||||
return;
|
||||
}
|
||||
// 判断字典中是否包含目标Key
|
||||
if (selectScene.difficultyToRoles.ContainsKey(targetKey))
|
||||
{
|
||||
// 获取目标Key对应的Value值
|
||||
List<string> roles = selectScene.difficultyToRoles[targetKey];
|
||||
foreach (var role in roles)
|
||||
{
|
||||
//if(sceneId=)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"The key {targetKey} does not exist in the dictionary.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user