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 b8ffce13..e97bc66a 100644
--- a/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackManager.cs
+++ b/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackManager.cs
@@ -96,16 +96,11 @@ 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;
}
///
diff --git a/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackWindowManager.cs b/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackWindowManager.cs
index 487d04d8..f3b656aa 100644
--- a/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackWindowManager.cs
+++ b/SXElectricityInformationAcquisition/Assets/Scripts/ToolsPack/ToolsPackWindowManager.cs
@@ -12,7 +12,7 @@ namespace ToolsPack
///
public class ToolsPackWindowManager : MonoBehaviour
{
- private List _toolsNames;
+ private Dictionary> _toolsNames;
[SerializeField] private Transform content;
@@ -23,6 +23,7 @@ namespace ToolsPack
{
Destroy(content.GetChild(i).gameObject);
}
+
MotionEngine.GetModule().ClearToolsPackWindowItemBts();
//初始化工具集
@@ -31,24 +32,32 @@ namespace ToolsPack
GameObject bt = MotionEngine.GetModule().GetToolsPackWindowBt();
foreach (var v in _toolsNames)
{
- List li = MotionEngine.GetModule().GetToolsPackData(v);
-
+ List li = MotionEngine.GetModule().GetToolsPackData(v.Key);
+
if (li == null)
{
ToolsPackWindowItemBtComponent btComponent = Instantiate(bt, content, false).GetComponent();
- btComponent.name = v;
- // btComponent.Init(v,v);
+ btComponent.name = v.Key;
+ btComponent.Init(v.Key, v.Key, 0);
MotionEngine.GetModule().AddToolsPackWindowItemBts(btComponent.gameObject);
}
else
{
- foreach (var to in li)
+ int index = 0;
+ foreach (var lis in v.Value)
{
- ToolsPackWindowItemBtComponent btComponent = Instantiate(bt, content, false).GetComponent();
- btComponent.name = to;
- // btComponent.Init(to,v);
- MotionEngine.GetModule().AddToolsPackWindowItemBts(btComponent.gameObject);
+ foreach (var to in li)
+ {
+ ToolsPackWindowItemBtComponent btComponent = Instantiate(bt, content, false).GetComponent();
+ btComponent.name = to;
+ btComponent.Init(to,v.Key,index);
+ MotionEngine.GetModule().AddToolsPackWindowItemBts(btComponent.gameObject);
+
+ }
+
+ index++;
}
+
}
}
}
diff --git a/SXElectricityInformationAcquisition/Assets/StreamingAssets/DataConfig/ToolsPackData.json b/SXElectricityInformationAcquisition/Assets/StreamingAssets/DataConfig/ToolsPackData.json
index 863f4baa..86cfe0d9 100644
--- a/SXElectricityInformationAcquisition/Assets/StreamingAssets/DataConfig/ToolsPackData.json
+++ b/SXElectricityInformationAcquisition/Assets/StreamingAssets/DataConfig/ToolsPackData.json
@@ -10,7 +10,7 @@
"盒装螺丝",
"盒装封印",
{
- "name": "集中器",
+ "name": "l型集中器",
"models": [
"集中器无盖模型",
"集中器盖子模型"