Json数据更改

This commit is contained in:
lq 2024-12-26 17:36:12 +08:00
parent c28f7f22cd
commit 7fc799c481
6 changed files with 158 additions and 284 deletions

View File

@ -129,7 +129,7 @@
"PlayerSpawnPoint": "1,-7.62,0.21,-54.14",
"LabelPos": "-7.62,0.21,-54.14",
"ShowRadius": "38",
"Oversee": "8006,1",
"Oversee": "8006,1|8010,1",
"EndPoint": "1042",
"RoleLimit": "2001,1,8006,1|2001,2,8006,1",
"Level": "1,20042"
@ -219,7 +219,7 @@
"PlayerSpawnPoint": "1,0.79,3.45,-54.84",
"LabelPos": "0.79,3.45,-54.84",
"ShowRadius": "38",
"Oversee": "8006,1",
"Oversee": "8006,1|8010,1",
"EndPoint": "1048",
"RoleLimit": "2001,1,8006,1|2001,2,8006,1",
"Level": "2,20043"
@ -234,7 +234,7 @@
"PlayerSpawnPoint": "1,9.26,3.45,-54.84",
"LabelPos": "9.26,3.45,-54.84",
"ShowRadius": "38",
"Oversee": "8006,1",
"Oversee": "8006,1|8010,1",
"EndPoint": "1049",
"RoleLimit": "2001,1,8006,1|2001,2,8006,1",
"Level": "2,20043"
@ -619,7 +619,7 @@
"Note": "1-3班操场位置",
"Name": "50041",
"Scene": "9003",
"Range": "-8,0.01,-44.1|-6,0.01,-44.1|-6,0.01,-27.1|-8,.01,-27.1",
"Range": "-6.5,0.01,-44.1|-4.5,0.01,-44.1|-4.5,0.01,-27.1|-6.5,.01,-27.1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "-1",
"LabelPos": "-1",
@ -1087,7 +1087,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,7.88,0.21,-41.28",
"LabelPos": "2,7.88,0.21,-41.28",
"LabelPos": "7.88,0.21,-41.28",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1102,7 +1102,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,7.88,3.45,-41.28",
"LabelPos": "2,7.88,3.45,-41.28",
"LabelPos": "7.88,3.45,-41.28",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1117,7 +1117,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,7.94,6.69,-36.68",
"LabelPos": "2,7.94,6.69,-36.68",
"LabelPos": "7.94,6.69,-36.68",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1132,7 +1132,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,7.88,6.69,-41.28",
"LabelPos": "2,7.88,6.69,-41.28",
"LabelPos": "7.88,6.69,-41.28",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1147,7 +1147,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,7.88,9.93,-41.28",
"LabelPos": "2,7.88,9.93,-41.28",
"LabelPos": "7.88,9.93,-41.28",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1162,7 +1162,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,7.88,13.17,-41.28",
"LabelPos": "2,7.88,13.17,-41.28",
"LabelPos": "7.88,13.17,-41.28",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1177,7 +1177,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,8.76,0.21,-38.35",
"LabelPos": "2,8.76,0.21,-38.35",
"LabelPos": "8.76,0.21,-38.35",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1192,7 +1192,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,7.94,6.69,-21.09",
"LabelPos": "2,7.94,6.69,-21.09",
"LabelPos": "7.94,6.69,-21.09",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1222,7 +1222,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,8.19,9.93,-38.55",
"LabelPos": "2,8.19,9.93,-38.55",
"LabelPos": "8.19,9.93,-38.55",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1254,7 +1254,7 @@
"PlayerSpawnPoint": "-1",
"LabelPos": "-1",
"ShowRadius": "-1",
"Oversee": "-1",
"Oversee": "8010,1",
"EndPoint": "-1",
"RoleLimit": "-1",
"Level": "2,20043"
@ -1269,7 +1269,7 @@
"PlayerSpawnPoint": "-1",
"LabelPos": "-1",
"ShowRadius": "-1",
"Oversee": "-1",
"Oversee": "8010,1",
"EndPoint": "-1",
"RoleLimit": "-1",
"Level": "3,20044"
@ -1299,7 +1299,7 @@
"PlayerSpawnPoint": "-1",
"LabelPos": "-1",
"ShowRadius": "-1",
"Oversee": "-1",
"Oversee": "8010,1",
"EndPoint": "-1",
"RoleLimit": "-1",
"Level": "5,20046"
@ -1374,7 +1374,7 @@
"PlayerSpawnPoint": "-1",
"LabelPos": "-1",
"ShowRadius": "-1",
"Oversee": "-1",
"Oversee": "8010,1",
"EndPoint": "-1",
"RoleLimit": "-1",
"Level": "5,20046"
@ -1387,7 +1387,7 @@
"Range": "-1",
"NpcRatio": "-1",
"PlayerSpawnPoint": "1.2,8.15,3.45,-38.21",
"LabelPos": "2,8.15,3.45,-38.21",
"LabelPos": "8.15,3.45,-38.21",
"ShowRadius": "38",
"Oversee": "-1",
"EndPoint": "-1",
@ -1415,7 +1415,7 @@
"Name": "50100",
"Scene": "9003",
"Range": "-22.49,0.93,-47.49|-22.49,0.93,-29.62|-19.66,0.93,-29.62|-17.7,0.25,-29.62|-14.87,0.25,-29.62|-14.87,0.25,-47.49|-17.7,0.25,-47.49|-19.66,0.93,-47.49",
"NpcRatio": "2001,6,6001,0,0.3,0",
"NpcRatio": "2001,6,6001,0,0.2,0",
"PlayerSpawnPoint": "-1",
"LabelPos": "-1",
"ShowRadius": "-1",
@ -1445,7 +1445,7 @@
"Name": "50102",
"Scene": "9003",
"Range": "-22.49,6.73,-47.51|-22.49,6.73,-29.63|-14.87,6.73,-29.63|-14.87,6.73,-47.51",
"NpcRatio": "2001,6,6001,0,0.3,0",
"NpcRatio": "2001,6,6001,0,0.2,0",
"PlayerSpawnPoint": "-1",
"LabelPos": "-1",
"ShowRadius": "-1",
@ -1453,5 +1453,20 @@
"EndPoint": "-1",
"RoleLimit": "-1",
"Level": "3,20044"
},
{
"ID": "1103",
"Note": "健身中心",
"Name": "50103",
"Scene": "9003",
"Range": "15.01,3.45,-27.48|15.01,3.45,-19.62|22.59,3.45,-19.62|22.59,3.45,-27.48",
"NpcRatio": "2001,6,6001,0,0.2,0",
"PlayerSpawnPoint": "-1",
"LabelPos": "-1",
"ShowRadius": "-1",
"Oversee": "-1",
"EndPoint": "-1",
"RoleLimit": "-1",
"Level": "2,20043"
}
]

View File

@ -722,139 +722,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 324885455}
m_CullTransparentMesh: 1
--- !u!1 &342885277
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 342885278}
- component: {fileID: 342885280}
- component: {fileID: 342885279}
- component: {fileID: 342885281}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &342885278
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 342885277}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 617308872}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1920, y: 1080}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &342885279
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 342885277}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 0d341980b0d10594ebff2c7fab7fb1d3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &342885280
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 342885277}
m_CullTransparentMesh: 1
--- !u!114 &342885281
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 342885277}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 342885279}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 617308873}
m_TargetAssemblyTypeName: ManagerPanel, Assembly-CSharp
m_MethodName: OnClickCloseBtn
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &361203551
GameObject:
m_ObjectHideFlags: 0
@ -1158,6 +1025,7 @@ GameObject:
- component: {fileID: 447504738}
- component: {fileID: 447504740}
- component: {fileID: 447504741}
- component: {fileID: 447504742}
m_Layer: 5
m_Name: WarningPop
m_TagString: Untagged
@ -1177,15 +1045,14 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1884689974}
- {fileID: 1790987176}
m_Father: {fileID: 1592869153}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -0.0088888}
m_SizeDelta: {x: 1920, y: 1080}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.008911133}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &447504740
CanvasRenderer:
@ -1209,6 +1076,36 @@ MonoBehaviour:
m_EditorClassIdentifier:
closeBtn: {fileID: 1241914629}
showText: {fileID: 1468625400}
--- !u!114 &447504742
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 447504737}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 0d341980b0d10594ebff2c7fab7fb1d3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &452024856
GameObject:
m_ObjectHideFlags: 0
@ -2336,6 +2233,8 @@ GameObject:
m_Component:
- component: {fileID: 617308872}
- component: {fileID: 617308873}
- component: {fileID: 617308875}
- component: {fileID: 617308874}
m_Layer: 5
m_Name: schedule_4_panel_Change
m_TagString: Untagged
@ -2355,7 +2254,6 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 342885278}
- {fileID: 1435623614}
- {fileID: 1120226610}
m_Father: {fileID: 1592869153}
@ -2363,8 +2261,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.000061035, y: 0}
m_SizeDelta: {x: 1920, y: 1080}
m_AnchoredPosition: {x: -0.000061035, y: -0.011719}
m_SizeDelta: {x: 2340, y: 1080}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &617308873
MonoBehaviour:
@ -2392,6 +2290,44 @@ MonoBehaviour:
panelInfo: {fileID: 618256462}
personnelPanel2: {fileID: 0}
distributionPanel: {fileID: 7318934474885050408}
--- !u!114 &617308874
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 617308871}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 0d341980b0d10594ebff2c7fab7fb1d3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &617308875
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 617308871}
m_CullTransparentMesh: 1
--- !u!1 &618256458
GameObject:
m_ObjectHideFlags: 0
@ -7071,7 +7007,7 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 617308872}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@ -9261,7 +9197,7 @@ RectTransform:
m_Children:
- {fileID: 1108110947}
m_Father: {fileID: 617308872}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@ -11098,7 +11034,7 @@ RectTransform:
- {fileID: 671339046}
- {fileID: 1046922002}
m_Father: {fileID: 447504738}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@ -11786,82 +11722,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1814351535}
m_CullTransparentMesh: 1
--- !u!1 &1884689973
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1884689974}
- component: {fileID: 1884689976}
- component: {fileID: 1884689975}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1884689974
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1884689973}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 447504738}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.000061035, y: -0.000061035}
m_SizeDelta: {x: 1920, y: 1080}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1884689975
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1884689973}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 0d341980b0d10594ebff2c7fab7fb1d3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1884689976
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1884689973}
m_CullTransparentMesh: 1
--- !u!1 &1885878471
GameObject:
m_ObjectHideFlags: 0

View File

@ -729,7 +729,6 @@ public class Panel : Base
prevText.color = Color.white; // 恢复原始颜色
}
}
// 设置当前选中的角色为选中状态
selectedPerson = clickedItem; // 更新选中人物
Text personText = clickedItem.GetComponentInChildren<Text>();
@ -766,7 +765,7 @@ public class Panel : Base
}
}
// 点击选中角色,改变视觉效果
// 点击选中场景,改变视觉效果
public void OnSceneItemClicked(GameObject clickedItem, Color color, GameObject select)
{
// 如果有之前选中的角色,重置其视觉效果

View File

@ -487,6 +487,7 @@ public class EvacuationPanel : Base
{
JueseChoicePop jueseChoicePop = jueseChoicePanel.GetComponent<JueseChoicePop>();
jueseChoicePanel.gameObject.SetActive(true);
jueseChoicePop.SetClass();
//jueseChoicePanel.SetClass();
});

View File

@ -24,8 +24,8 @@ public class PeopleItem : MonoBehaviour
{
Name = name;
nameText.text = name;
SetAdded(added);
button.onClick.AddListener(OnButtonClick);
//SetAdded(added);
//button.onClick.AddListener(OnButtonClick);
}
// ÉčÖĂŇŃĚíźÓ×´ĚŹ

View File

@ -35,7 +35,7 @@ public class JueseChoicePop : MonoBehaviour
}
void Update()
{
}
void CLosePop()
{
@ -53,52 +53,51 @@ public class JueseChoicePop : MonoBehaviour
}
//加载分管人员
public void SetClass(int id, string scnenName)
public void SetClass()
{
if (instantiatedObjects.Any(obj => obj.GetComponent<ClassMate>().id == id))
//if (instantiatedObjects.Any(obj => obj.GetComponent<ClassMate>().id == id))
//{
// Debug.Log($"这个: {id} 已经被实例化.");
// return; // 如果已实例化,跳过
//}
//foreach (Transform child in content)
//{
// Destroy(child.gameObject);
//}
foreach(var all in panel.sceneDataDictionary)
{
Debug.Log($"这个: {id} 已经被实例化.");
return; // 如果已实例化,跳过
}
foreach (Transform child in content)
{
Destroy(child.gameObject);
}
LocationData locationData = jsonReader.GetAreaDateById(id);
if (locationData.Oversee == "-1")
{
Debug.Log($"Skipping ID {id}: Oversee is -1.");
return; // 跳过
}
string[] overseeParts = locationData.Oversee.Split(',');
string firstElement = overseeParts[0];
string lastElement = overseeParts[1];
if (overseeParts.Length > 0)
{
if (lastElement == "1")
{
foreach (var pair in panel.sceneDataDictionary)
foreach (var info in all.Value)
{Debug.LogError("-------------------------"+ info.sceneId);
LocationData locationData = jsonReader.GetAreaDateById(int.Parse(info.sceneId));
if (locationData.Oversee == "-1")
{
foreach (var selectedInfo in pair.Value)
Debug.Log($"Skipping ID{info.sceneId}: Oversee is -1.");
continue; // 跳过
}
string[] overseeParts = locationData.Oversee.Split(',');
string firstElement = overseeParts[0];
string lastElement = overseeParts[1];
if (overseeParts.Length > 0)
{
if(firstElement==info.dutyId&&lastElement=="1")
{
if (selectedInfo.dutyId == firstElement)
{
GameObject item = GameObject.Instantiate(classmatePrefab, content);
ClassMate classMate = item.GetComponent<ClassMate>();
Button button = item.GetComponent<Button>();
button.onClick.AddListener(() => {
SetClassMate(classMate, scnenName);
});
classMate.name = selectedInfo.name;
classMate.classmatename.text = classMate.name;
classMate.id = id;
instantiatedObjects.Add(item);
}
GameObject item = GameObject.Instantiate(classmatePrefab, content);
ClassMate classMate = item.GetComponent<ClassMate>();
Button button = item.GetComponent<Button>();
//button.onClick.AddListener(() =>
//{
// SetClassMate(classMate, scnenName);
//});
classMate.name = info.name;
classMate.classmatename.text = classMate.name;
//classMate.id = info.dutyId;
instantiatedObjects.Add(item);
}
}
Debug.Log($"Instantiated ClassMate for ID {id} with name {locationData.Name}");
}
}
}
}
//点击人员后设置位置的方法
public void SetClassMate(ClassMate classMate, string a = "")