Compare commits
3 Commits
1315f118ff
...
46f1f02cdc
| Author | SHA1 | Date |
|---|---|---|
|
|
46f1f02cdc | |
|
|
c24ecff39c | |
|
|
287973be2a |
|
|
@ -828,10 +828,6 @@
|
|||
<Project>{e8ea8a32-db36-1909-a8a7-26f06060f4d3}</Project>
|
||||
<Name>UniTask.Linq</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="AmplifyShaderEditor.csproj">
|
||||
<Project>{876d7bbd-6f78-6599-5008-d6ab40ab5602}</Project>
|
||||
<Name>AmplifyShaderEditor</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="NaughtyAttributes.Core.csproj">
|
||||
<Project>{b366c870-8269-aeae-4186-8220020279aa}</Project>
|
||||
<Name>NaughtyAttributes.Core</Name>
|
||||
|
|
|
|||
|
|
@ -781,10 +781,6 @@
|
|||
<Project>{e8ea8a32-db36-1909-a8a7-26f06060f4d3}</Project>
|
||||
<Name>UniTask.Linq</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="AmplifyShaderEditor.csproj">
|
||||
<Project>{876d7bbd-6f78-6599-5008-d6ab40ab5602}</Project>
|
||||
<Name>AmplifyShaderEditor</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="NaughtyAttributes.Core.csproj">
|
||||
<Project>{b366c870-8269-aeae-4186-8220020279aa}</Project>
|
||||
<Name>NaughtyAttributes.Core</Name>
|
||||
|
|
|
|||
|
|
@ -828,10 +828,6 @@
|
|||
<Project>{e8ea8a32-db36-1909-a8a7-26f06060f4d3}</Project>
|
||||
<Name>UniTask.Linq</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="AmplifyShaderEditor.csproj">
|
||||
<Project>{876d7bbd-6f78-6599-5008-d6ab40ab5602}</Project>
|
||||
<Name>AmplifyShaderEditor</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="NaughtyAttributes.Core.csproj">
|
||||
<Project>{b366c870-8269-aeae-4186-8220020279aa}</Project>
|
||||
<Name>NaughtyAttributes.Core</Name>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using DefaultNamespace;
|
|||
using MotionFramework;
|
||||
using MotionFramework.Scripts.Runtime.Engine.Engine.Network.WebRequest;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using ToolsPack;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
|
|
@ -87,10 +88,23 @@ public class ToolsPackManager : ModuleSingleton<ToolsPackManager>, IModule
|
|||
/// 删除工具包
|
||||
/// </summary>
|
||||
/// <param name="toolsName"></param>
|
||||
public void DeleteToolsPack(string toolsName)
|
||||
public void DeleteToolsPack(string toolsName, int index)
|
||||
{
|
||||
if (_toolsPack[toolsName].Count > 0)
|
||||
{
|
||||
for (int i = 0; i < _toolsPack[toolsName].Count; i++)
|
||||
{
|
||||
if (i == index)
|
||||
{
|
||||
_toolsPack[toolsName].RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_toolsPack.Remove(toolsName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有工具包内容
|
||||
|
|
@ -98,8 +112,6 @@ public class ToolsPackManager : ModuleSingleton<ToolsPackManager>, IModule
|
|||
/// <returns></returns>
|
||||
public Dictionary<string, List<GameObject>> GetToolsPack()
|
||||
{
|
||||
|
||||
|
||||
return _toolsPack;
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +197,12 @@ public class ToolsPackManager : ModuleSingleton<ToolsPackManager>, IModule
|
|||
_toolsPackWindowItemBts.Clear();
|
||||
}
|
||||
|
||||
public void DeleteToolsPackWindowItemBts(string toolName)
|
||||
/// <summary>
|
||||
/// 删除背包里的UI按钮
|
||||
/// </summary>
|
||||
/// <param name="toolName"></param>
|
||||
/// <param name="index"></param>
|
||||
public void DeleteToolsPackWindowItemBts(string toolName, int index)
|
||||
{
|
||||
List<string> list = MotionEngine.GetModule<DataConfigManager>().GetToolsPackData(toolName);
|
||||
if (list != null)
|
||||
|
|
@ -194,7 +211,7 @@ public class ToolsPackManager : ModuleSingleton<ToolsPackManager>, IModule
|
|||
{
|
||||
for (int j = 0; j < list.Count; j++)
|
||||
{
|
||||
if (_toolsPackWindowItemBts[i].name == list[j])
|
||||
if (_toolsPackWindowItemBts[i].name == list[j] && _toolsPackWindowItemBts[i].GetComponent<ToolsPackWindowItemBtComponent>().GetIndex() == index)
|
||||
{
|
||||
GameObject g = _toolsPackWindowItemBts[i];
|
||||
_toolsPackWindowItemBts.Remove(g);
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ namespace ToolsPack
|
|||
{
|
||||
GameObject toolsGame = MotionEngine.GetModule<ToolsPackManager>().GetToolsPack(btName,index);
|
||||
toolsGame.SetActive(true);
|
||||
MotionEngine.GetModule<ToolsPackManager>().DeleteToolsPack(btName);
|
||||
MotionEngine.GetModule<ToolsPackManager>().DeleteToolsPackWindowItemBts(btName);
|
||||
MotionEngine.GetModule<ToolsPackManager>().DeleteToolsPack(btName,index);
|
||||
MotionEngine.GetModule<ToolsPackManager>().DeleteToolsPackWindowItemBts(btName,index);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -52,5 +52,10 @@ namespace ToolsPack
|
|||
{
|
||||
btNameText.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public int GetIndex()
|
||||
{
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmplifyShaderEditor", "AmplifyShaderEditor.csproj", "{876d7bbd-6f78-6599-5008-d6ab40ab5602}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NaughtyAttributes.Core", "NaughtyAttributes.Core.csproj", "{b366c870-8269-aeae-4186-8220020279aa}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.Linq", "UniTask.Linq.csproj", "{e8ea8a32-db36-1909-a8a7-26f06060f4d3}"
|
||||
|
|
@ -34,8 +32,6 @@ Global
|
|||
Debug|Any CPU = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{876d7bbd-6f78-6599-5008-d6ab40ab5602}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{876d7bbd-6f78-6599-5008-d6ab40ab5602}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{b366c870-8269-aeae-4186-8220020279aa}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{b366c870-8269-aeae-4186-8220020279aa}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{e8ea8a32-db36-1909-a8a7-26f06060f4d3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
|
|||
Loading…
Reference in New Issue