diff --git a/xiaofang/Assets/Scenes/Schedule_03.unity b/xiaofang/Assets/Scenes/Schedule_03.unity index 8020f41a..e44a4072 100644 --- a/xiaofang/Assets/Scenes/Schedule_03.unity +++ b/xiaofang/Assets/Scenes/Schedule_03.unity @@ -773,14 +773,14 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0} + m_Color: {r: 0.335849, g: 0.316205, b: 0.316205, a: 1} 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: 04a1edbf9a644554c87e0dfdce72653e, type: 3} + m_Sprite: {fileID: 21300000, guid: 95b33b62057b969459448a188c934119, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -967,6 +967,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 + - m_Target: {fileID: 618256462} + m_TargetAssemblyTypeName: Panel, Assembly-CSharp + m_MethodName: SetTitleText + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 2020842121} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Text, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_IsOn: 0 --- !u!114 &361203554 MonoBehaviour: @@ -1247,6 +1259,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 + - m_Target: {fileID: 618256462} + m_TargetAssemblyTypeName: Panel, Assembly-CSharp + m_MethodName: SetTitleText + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1103804287} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Text, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_IsOn: 0 --- !u!114 &452024859 MonoBehaviour: @@ -1462,7 +1486,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 521824338218413953, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: -20.381073 objectReference: {fileID: 0} - target: {fileID: 521824338318890041, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: m_AnchorMax.x @@ -1474,7 +1498,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 521824338318890041, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: -20.381073 objectReference: {fileID: 0} - target: {fileID: 1373529960062900723, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.size @@ -1656,9 +1680,21 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 267.551 objectReference: {fileID: 0} + - target: {fileID: 3849503019427133880, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} + propertyPath: m_SizeDelta.x + value: 160.437 + objectReference: {fileID: 0} + - target: {fileID: 3849503019427133880, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} + propertyPath: m_SizeDelta.y + value: 420.253 + objectReference: {fileID: 0} + - target: {fileID: 3849503019427133880, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} + propertyPath: m_AnchoredPosition.x + value: -8.4917 + objectReference: {fileID: 0} - target: {fileID: 3849503019427133883, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4599960695770769989, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: m_AnchorMax.x @@ -1670,7 +1706,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4599960695770769989, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: -2.275772 objectReference: {fileID: 0} - target: {fileID: 5134555548762687368, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: m_AnchorMax.x @@ -1682,7 +1718,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5134555548762687368, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: -2.2757874 objectReference: {fileID: 0} - target: {fileID: 7187413038405322106, guid: 26d5710936f5f7d468eb5eb9da96112e, type: 3} propertyPath: panel @@ -2334,6 +2370,7 @@ MonoBehaviour: toggleImage: - {fileID: 21300000, guid: 9b39ad4a6d4365f4b937bebb942cd186, type: 3} - {fileID: 21300000, guid: 33cc51e785571694a82fca6e26492330, type: 3} + titleText: {fileID: 1343620366} ManagerPanel: {fileID: 617308871} peopleCountent: {fileID: 667280287} peoplePrefab: {fileID: 4204671800070690484, guid: 5e14c4abba3cf1a4099ba76ddf50a689, type: 3} @@ -7018,6 +7055,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 + - m_Target: {fileID: 618256462} + m_TargetAssemblyTypeName: Panel, Assembly-CSharp + m_MethodName: SetTitleText + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 1256342110} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Text, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_IsOn: 0 --- !u!114 &1194981514 MonoBehaviour: @@ -7344,6 +7393,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 + - m_Target: {fileID: 618256462} + m_TargetAssemblyTypeName: Panel, Assembly-CSharp + m_MethodName: SetTitleText + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 191833649} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Text, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_IsOn: 0 --- !u!114 &1247260777 MonoBehaviour: @@ -10036,6 +10097,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 + - m_Target: {fileID: 618256462} + m_TargetAssemblyTypeName: Panel, Assembly-CSharp + m_MethodName: SetTitleText + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 2011236325} + m_ObjectArgumentAssemblyTypeName: UnityEngine.UI.Text, UnityEngine.UI + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_IsOn: 0 --- !u!114 &1783365055 MonoBehaviour: @@ -14990,9 +15063,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 334.1322, y: -55} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064122132329 @@ -15273,9 +15346,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 753.3966, y: -55} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064198941274 @@ -16089,6 +16162,7 @@ MonoBehaviour: incidentLable: {fileID: 7468736064937661071} randomEventBtn: {fileID: 7468736064832119474} text20008: {fileID: 7468736063763417177} + text20010: {fileID: 7468736065139644656} title: {fileID: 7468736063763417177} schoolInfoList: - {fileID: 7468736064927213727} @@ -16515,9 +16589,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 543.7644, y: -55} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064659112359 @@ -16883,9 +16957,9 @@ RectTransform: m_Father: {fileID: 7468736063934366934} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 124.5, y: -55} m_SizeDelta: {x: 187, y: 110} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064820222392 @@ -17296,9 +17370,9 @@ RectTransform: m_Father: {fileID: 7468736064579811971} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 917, y: -1328.051} m_SizeDelta: {x: 1834, y: 498.685} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736064937661071 @@ -17316,7 +17390,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!222 &7468736065013593257 CanvasRenderer: m_ObjectHideFlags: 0 @@ -18552,9 +18626,9 @@ RectTransform: m_Father: {fileID: 7468736064579811971} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 917, y: -588.33496} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 1834, y: 498.685} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7468736065836200803 @@ -18572,7 +18646,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &8920314133631286993 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/xiaofang/Assets/Script/JSONReader/JSONReader.cs b/xiaofang/Assets/Script/JSONReader/JSONReader.cs index 028f8797..1af07ebc 100644 --- a/xiaofang/Assets/Script/JSONReader/JSONReader.cs +++ b/xiaofang/Assets/Script/JSONReader/JSONReader.cs @@ -368,10 +368,10 @@ public class JSONReader : MonoBehaviour } //设置UI文本的方法 - public string SetUIText(int id) + public string SetUIText(string id) { Language info = null; - if (LanguageDictionary.TryGetValue(id, out info)) + if (LanguageDictionary.TryGetValue(int.Parse(id), out info)) { return info.Text; } diff --git a/xiaofang/Assets/Script/Scheduled_03/Panel.cs b/xiaofang/Assets/Script/Scheduled_03/Panel.cs index eefa94c8..b9ccfcba 100644 --- a/xiaofang/Assets/Script/Scheduled_03/Panel.cs +++ b/xiaofang/Assets/Script/Scheduled_03/Panel.cs @@ -50,6 +50,8 @@ public class Panel : Base [Header("面板选择")] public Toggle[] panelToggle;//面板选择Toggle public Sprite[] toggleImage;//面板选择图片 + [Header("UI面板名")] + public Text titleText; [Header("物体")] @@ -166,7 +168,7 @@ public class Panel : Base GameObject item = GameObject.Instantiate(dutyPrefab, dutyCount); DutyItem dutyItem = item.GetComponent(); Button dutuybutton = item.transform.Find("TextBtn").GetComponent