diff --git a/SXElectricityInformationAcquisition/Assembly-CSharp.csproj b/SXElectricityInformationAcquisition/Assembly-CSharp.csproj
index d97a987c..1ca48788 100644
--- a/SXElectricityInformationAcquisition/Assembly-CSharp.csproj
+++ b/SXElectricityInformationAcquisition/Assembly-CSharp.csproj
@@ -81,6 +81,7 @@
+
diff --git a/SXElectricityInformationAcquisition/Assets/Scenes/工具间Scenes/工具间.unity b/SXElectricityInformationAcquisition/Assets/Scenes/工具间Scenes/工具间.unity
index de59b4bb..97737de4 100644
--- a/SXElectricityInformationAcquisition/Assets/Scenes/工具间Scenes/工具间.unity
+++ b/SXElectricityInformationAcquisition/Assets/Scenes/工具间Scenes/工具间.unity
@@ -344,7 +344,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7587649942819475418, guid: 6c9d41f3e96937c4f960e7fc87ca2d32, type: 3}
propertyPath: m_Name
- value: "I\u578B\u96C6\u4E2D\u5668 (1)"
+ value: "l\u578B\u96C6\u4E2D\u5668"
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
@@ -1272,7 +1272,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7587649942819475418, guid: 6c9d41f3e96937c4f960e7fc87ca2d32, type: 3}
propertyPath: m_Name
- value: "I\u578B\u96C6\u4E2D\u5668 (2)"
+ value: "l\u578B\u96C6\u4E2D\u5668"
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
@@ -1986,8 +1986,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
serializedVersion: 2
- m_LocalRotation: {x: -0.0015304144, y: 0.99706376, z: -0.07372659, w: -0.020641118}
- m_LocalPosition: {x: 1.2103322, y: 1.4038103, z: 1.5464077}
+ m_LocalRotation: {x: -0.118146285, y: 0.76067626, z: -0.14457282, w: -0.6217007}
+ m_LocalPosition: {x: -1.6662588, y: 1.7118076, z: -0.40496927}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@@ -2440,68 +2440,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1160688574}
m_Mesh: {fileID: 2272001217198551621, guid: 156cca832bad49447b16a92685b1fa5b, type: 3}
---- !u!1001 &1166424402
-PrefabInstance:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- serializedVersion: 3
- m_TransformParent: {fileID: 1771205975173060022}
- m_Modifications:
- - target: {fileID: 2531760708895959068, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_Name
- value: "\u5DE5\u4F5C\u5355 (1)"
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalPosition.x
- value: -3.128
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalPosition.y
- value: 1.559
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalPosition.z
- value: -4.491
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalRotation.w
- value: 0.50000155
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalRotation.x
- value: 0.5
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalRotation.y
- value: -0.5
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalRotation.z
- value: 0.49999842
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 90
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 90
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_RemovedGameObjects: []
- m_AddedGameObjects: []
- m_AddedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
---- !u!4 &1166424403 stripped
-Transform:
- m_CorrespondingSourceObject: {fileID: 8682586252348545697, guid: d0b0fe5637eccca4d916e04a7613ab7b, type: 3}
- m_PrefabInstance: {fileID: 1166424402}
- m_PrefabAsset: {fileID: 0}
--- !u!1001 &1189895269
PrefabInstance:
m_ObjectHideFlags: 0
@@ -4275,7 +4213,6 @@ Transform:
- {fileID: 97983903}
- {fileID: 930152845}
- {fileID: 1730311795}
- - {fileID: 1166424403}
- {fileID: 4237368092973860874}
- {fileID: 11517223}
- {fileID: 541355879}
@@ -4643,7 +4580,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7587649942819475418, guid: 6c9d41f3e96937c4f960e7fc87ca2d32, type: 3}
propertyPath: m_Name
- value: "I\u578B\u96C6\u4E2D\u5668"
+ value: "l\u578B\u96C6\u4E2D\u5668"
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
diff --git a/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackManager.cs b/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackManager.cs
index 0f081ec8..e97bc66a 100644
--- a/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackManager.cs
+++ b/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackManager.cs
@@ -18,22 +18,21 @@ public enum ToolsPackScene
///
/// 工具包
///
-public class ToolsPackManager : ModuleSingleton, IModule
-{
-
- private Dictionary _toolsPack;
+public class ToolsPackManager : ModuleSingleton, IModule
+{
+ private Dictionary> _toolsPack;
private Dictionary _toolsPackWindowBtImage; //工具窗口下的按钮图集
- private List _toolsPackWindowItemBts;//工具窗口下创建的按钮集合,点击按钮的X用来删除和新增
- private GameObject _toolsPackWindow;
+ private List _toolsPackWindowItemBts; //工具窗口下创建的按钮集合,点击按钮的X用来删除和新增
+ private GameObject _toolsPackWindow;
private GameObject _toolsPackWindowBt;
private Transform _canvas;
-
+
private GameObject _toolsPackWindowTemp;
private ToolsPackScene _toolsPackScene;
-
+
public void OnCreate(object createParam)
{
- _toolsPack = new Dictionary();
+ _toolsPack = new Dictionary>();
_toolsPackWindowItemBts = new List();
//加载工具窗口按钮
_toolsPackWindowBt = Resources.Load("Prefabs/Window/ToolsPack/ToolsPackWindowItemBt");
@@ -76,7 +75,11 @@ public class ToolsPackManager : ModuleSingleton, IModule
{
if (!_toolsPack.ContainsKey(toolsName))
{
- _toolsPack.Add(toolsName, toolsGame);
+ _toolsPack.Add(toolsName, new List() { toolsGame });
+ }
+ else
+ {
+ _toolsPack[toolsName].Add(toolsGame);
}
}
@@ -93,31 +96,32 @@ public class ToolsPackManager : ModuleSingleton, IModule
/// 获取所有工具包内容
///
///
- public List GetToolsPack()
+ public Dictionary> GetToolsPack()
{
- List list = new List();
+
- foreach (var v in _toolsPack)
- {
- list.Add(v.Key);
- }
-
- return list;
+ return _toolsPack;
}
///
/// 根据名字查询工具包内容
///
///
- public (string, GameObject) GetToolsPack(string toolsName)
+ public GameObject GetToolsPack(string toolsName,int index)
{
- GameObject game;
+ List game;
if (_toolsPack.TryGetValue(toolsName, out game))
{
- return (toolsName, game);
+ for (int i = 0; i < game.Count; i++)
+ {
+ if (i == index)
+ {
+ return (game[i]);
+ }
+ }
}
- return (toolsName, null);
+ return null;
}
public Texture2D GetToolsPackWindowBtImage(string gName)
@@ -135,17 +139,17 @@ public class ToolsPackManager : ModuleSingleton, IModule
{
return _toolsPackWindow;
}
-
+
public GameObject GetToolsPackWindowBt()
{
return _toolsPackWindowBt;
}
-
+
public GameObject GetToolsPackWindowTemp()
{
return _toolsPackWindowTemp;
}
-
+
public void SetToolsPackWindowTemp(GameObject win)
{
_toolsPackWindowTemp = win;
@@ -160,10 +164,12 @@ public class ToolsPackManager : ModuleSingleton, IModule
return _canvas;
}
+
public ToolsPackScene GetToolsPackScene()
{
return _toolsPackScene;
}
+
public void SetToolsPackScene(ToolsPackScene toolsPackScene)
{
_toolsPackScene = toolsPackScene;
@@ -173,14 +179,15 @@ public class ToolsPackManager : ModuleSingleton, IModule
{
_toolsPackWindowItemBts.Add(toolGame);
}
+
public void ClearToolsPackWindowItemBts()
{
_toolsPackWindowItemBts.Clear();
}
+
public void DeleteToolsPackWindowItemBts(string toolName)
{
-
- List list = MotionEngine.GetModule().GetToolsPackData(toolName);
+ List list = MotionEngine.GetModule().GetToolsPackData(toolName);
if (list != null)
{
for (int i = 0; i < _toolsPackWindowItemBts.Count; i++)
@@ -208,7 +215,5 @@ public class ToolsPackManager : ModuleSingleton, IModule
}
}
}
-
-
}
}
\ No newline at end of file
diff --git a/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackWindowItemBtComponent.cs b/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackWindowItemBtComponent.cs
index f1663995..797accce 100644
--- a/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackWindowItemBtComponent.cs
+++ b/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackWindowItemBtComponent.cs
@@ -12,6 +12,7 @@ namespace ToolsPack
[SerializeField] private RawImage ico;
[SerializeField] private GameObject closeBt;
[SerializeField] private string btName;
+ [SerializeField] private int index;
[SerializeField] private Text btNameText;
@@ -19,18 +20,18 @@ namespace ToolsPack
{
closeBt.GetComponent