Compare commits

...

2 Commits

Author SHA1 Message Date
lq
975d8aac61 Merge branch 'main' of http://shu.sheziwanglo.cn:3000/wulongxiao/_xiaofang 2024-12-02 10:50:51 +08:00
lq
56fb511330 人员配置修改 2024-12-02 10:50:31 +08:00
3 changed files with 57 additions and 41 deletions

View File

@ -200,7 +200,19 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 3344224971532102837}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName:
m_MethodName:
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName:
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &3344224972021141760
GameObject:
m_ObjectHideFlags: 0
@ -259,5 +271,3 @@ MonoBehaviour:
defaultColor: {r: 1, g: 1, b: 1, a: 1}
addedColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
selectedColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
sceneButtonObject: {fileID: 3344224971532102792}
sceneText: {fileID: 3344224971532102837}

View File

@ -5755,11 +5755,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7468736063766935915, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 1834
objectReference: {fileID: 0}
- target: {fileID: 7468736063766935915, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 1577.3936
objectReference: {fileID: 0}
- target: {fileID: 7468736063766935915, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_LocalPosition.x
@ -5815,39 +5815,39 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7468736063766935916, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7468736063812420174, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736063812420174, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7468736063812420174, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736063812420174, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 543.7644
objectReference: {fileID: 0}
- target: {fileID: 7468736063812420174, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -55
objectReference: {fileID: 0}
- target: {fileID: 7468736063881909988, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736063881909988, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736063881909988, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 917
objectReference: {fileID: 0}
- target: {fileID: 7468736063881909988, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -53.335
objectReference: {fileID: 0}
- target: {fileID: 7468736064052287372, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: eventName
@ -5947,51 +5947,51 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7468736064250338014, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736064250338014, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736064250338014, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 917
objectReference: {fileID: 0}
- target: {fileID: 7468736064250338014, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -343.34674
objectReference: {fileID: 0}
- target: {fileID: 7468736064349377664, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736064349377664, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736064349377664, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 334.1322
objectReference: {fileID: 0}
- target: {fileID: 7468736064349377664, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -55
objectReference: {fileID: 0}
- target: {fileID: 7468736064407837105, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736064407837105, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736064407837105, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 753.3966
objectReference: {fileID: 0}
- target: {fileID: 7468736064407837105, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -55
objectReference: {fileID: 0}
- target: {fileID: 7468736064424568481, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
@ -6055,7 +6055,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7468736064580561832, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: -1792
objectReference: {fileID: 0}
- target: {fileID: 7468736065055436938, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMax.y
@ -6079,35 +6079,35 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7468736065668749935, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736065668749935, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736065668749935, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 124.5
objectReference: {fileID: 0}
- target: {fileID: 7468736065668749935, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -55
objectReference: {fileID: 0}
- target: {fileID: 7468736065685524838, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736065685524838, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7468736065685524838, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 917
objectReference: {fileID: 0}
- target: {fileID: 7468736065685524838, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -1328.051
objectReference: {fileID: 0}
- target: {fileID: 7468736065685524839, guid: 90919b88a71f0054bb1cf84429cb3a1e, type: 3}
propertyPath: m_IsActive
@ -10698,6 +10698,10 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2102021661377337229, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
propertyPath: js
value:
objectReference: {fileID: 1417128757}
- target: {fileID: 2102021661377337229, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
propertyPath: panel
value:
@ -12566,7 +12570,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u5E94\u6025\u4EBA\u56E2\u914D\u7F6E"
m_Text: "\u5E94\u6025\u4EBA\u5458\u914D\u7F6E"
--- !u!222 &2020842122
CanvasRenderer:
m_ObjectHideFlags: 0

View File

@ -1,10 +1,12 @@
using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
@ -159,7 +161,6 @@ public class Panel : MonoBehaviour
}
else
{
// 实例化NPC预制体
GameObject item = GameObject.Instantiate<GameObject>(scenePrefab, sceneCount);
SceneItem sceneItem = item.GetComponent<SceneItem>();
// 设置limitNum
@ -193,6 +194,8 @@ public class Panel : MonoBehaviour
{
//Debug.Log($"场景: {sceneEntry.Key},人数: {sceneEntry.Value.Count}");
GameObject managerPanelInstance = Instantiate(ManagerPanelPrefab, panelContent);
Button button= managerPanelInstance.GetComponent<Button>();
button.onClick.AddListener(() => managerPanel1.OnItemClicked(managerPanelInstance));
//ManagerPanel managerPanelScript = managerPanelInstance.GetComponentInParent<ManagerPanel>();
Text sceneText= managerPanelInstance.transform.Find("top/sceneName").GetComponent<Text>();
sceneText.text = sceneEntry.Key;
@ -201,7 +204,6 @@ public class Panel : MonoBehaviour
ManagerPanel.gameObject.SetActive(true);
}
}
//处理点击确认按钮
public void ClickSureBtn()
{
@ -248,7 +250,7 @@ public class Panel : MonoBehaviour
currentSceneInfo.Add(newSelectedInfo);
// 打印当前场景人员信息
Debug.Log($"场景: {sceneName},选中的人员: {selectedInfo.name},职责: {selectedInfo.duty}");
//Debug.Log($"场景: {sceneName},选中的人员: {selectedInfo.name},职责: {selectedInfo.duty}");
// 禁用确认按钮并清空选择标志
sureBtn.interactable = false; // 禁用确认按钮