Compare commits
2 Commits
b99c36d5f1
...
3a7ce99cad
| Author | SHA1 | Date |
|---|---|---|
|
|
3a7ce99cad | |
|
|
efde902b6e |
|
|
@ -107,8 +107,8 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 1, y: 1}
|
m_AnchorMin: {x: 1, y: 1}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: -23.4124, y: -24.6081}
|
m_AnchoredPosition: {x: -11.5, y: -11.5}
|
||||||
m_SizeDelta: {x: 53.4492, y: 51.7196}
|
m_SizeDelta: {x: 28, y: 28}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &5821869034076030348
|
--- !u!222 &5821869034076030348
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
|
@ -131,14 +131,14 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 1
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 21300000, guid: 6304d6ef3690ae44ea4fd8b2c0465d7f, type: 3}
|
m_Sprite: {fileID: 21300000, guid: a6de60d73ddc8784f9248fa0fbe38747, type: 3}
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
|
|
|
||||||
|
|
@ -293,16 +293,17 @@ public class ToolsPackManager : ModuleSingleton<ToolsPackManager>, IModule
|
||||||
/// <param name="index"></param>
|
/// <param name="index"></param>
|
||||||
public void DeleteToolsPackWindowItemBts(string toolName, int index)
|
public void DeleteToolsPackWindowItemBts(string toolName, int index)
|
||||||
{
|
{
|
||||||
|
List<GameObject> games = new List<GameObject>();
|
||||||
List<string> list = MotionEngine.GetModule<DataConfigManager>().GetToolsPackData(toolName);
|
List<string> list = MotionEngine.GetModule<DataConfigManager>().GetToolsPackData(toolName);
|
||||||
if (list != null)
|
if (list != null)
|
||||||
{
|
|
||||||
for (int i = 0; i < _toolsPackWindowItemBts.Count; i++)
|
|
||||||
{
|
{
|
||||||
for (int j = 0; j < list.Count; j++)
|
for (int j = 0; j < list.Count; j++)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < _toolsPackWindowItemBts.Count; i++)
|
||||||
{
|
{
|
||||||
ToolsPackWindowItemBtComponent toolspack = _toolsPackWindowItemBts[i].GetComponent<ToolsPackWindowItemBtComponent>();
|
ToolsPackWindowItemBtComponent toolspack = _toolsPackWindowItemBts[i].GetComponent<ToolsPackWindowItemBtComponent>();
|
||||||
|
int tooslIndex = toolspack.GetIndex();
|
||||||
if (_toolsPackWindowItemBts[i].name == list[j] && toolspack.GetIndex() == index)
|
if (_toolsPackWindowItemBts[i].name == list[j] && tooslIndex == index)
|
||||||
{
|
{
|
||||||
if (toolspack.GetGameNumber() > 1)
|
if (toolspack.GetGameNumber() > 1)
|
||||||
{
|
{
|
||||||
|
|
@ -310,13 +311,21 @@ public class ToolsPackManager : ModuleSingleton<ToolsPackManager>, IModule
|
||||||
}
|
}
|
||||||
else if (toolspack.GetGameNumber() == 1)
|
else if (toolspack.GetGameNumber() == 1)
|
||||||
{
|
{
|
||||||
|
toolspack.ReduceGameNumber();
|
||||||
GameObject g = _toolsPackWindowItemBts[i];
|
GameObject g = _toolsPackWindowItemBts[i];
|
||||||
_toolsPackWindowItemBts.Remove(g);
|
games.Add(g);
|
||||||
UnityEngine.Object.Destroy(g);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var v in games)
|
||||||
|
{
|
||||||
|
_toolsPackWindowItemBts.Remove(v);
|
||||||
|
UnityEngine.Object.Destroy(v);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,13 @@ namespace ToolsPack
|
||||||
[SerializeField] private Image btImage;
|
[SerializeField] private Image btImage;
|
||||||
|
|
||||||
|
|
||||||
[SerializeField] private Dictionary<int,string> _toolsPackWindowItemBtModels;
|
[SerializeField] private Dictionary<int, string> _toolsPackWindowItemBtModels;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
btImage = this.GetComponent<Image>();
|
btImage = this.GetComponent<Image>();
|
||||||
gameNumber = 1;
|
gameNumber = 1;
|
||||||
_toolsPackWindowItemBtModels = new Dictionary<int,string>();
|
_toolsPackWindowItemBtModels = new Dictionary<int, string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
|
@ -45,8 +45,8 @@ namespace ToolsPack
|
||||||
index = _toolsPackWindowItemBtModels.Count - 1;
|
index = _toolsPackWindowItemBtModels.Count - 1;
|
||||||
btName = _toolsPackWindowItemBtModels[_toolsPackWindowItemBtModels.Count - 1];
|
btName = _toolsPackWindowItemBtModels[_toolsPackWindowItemBtModels.Count - 1];
|
||||||
|
|
||||||
_toolsPackWindowItemBtModels.Remove(index);
|
|
||||||
GameObject toolsGame = MotionEngine.GetModule<ToolsPackManager>().GetToolsPack(btName, index );
|
GameObject toolsGame = MotionEngine.GetModule<ToolsPackManager>().GetToolsPack(btName, index);
|
||||||
toolsGame.SetActive(true);
|
toolsGame.SetActive(true);
|
||||||
MotionEngine.GetModule<ToolsPackManager>().DeleteToolsPack(btName, index);
|
MotionEngine.GetModule<ToolsPackManager>().DeleteToolsPack(btName, index);
|
||||||
MotionEngine.GetModule<ToolsPackManager>().DeleteToolsPackWindowItemBts(btName, index);
|
MotionEngine.GetModule<ToolsPackManager>().DeleteToolsPackWindowItemBts(btName, index);
|
||||||
|
|
@ -80,7 +80,7 @@ namespace ToolsPack
|
||||||
ico.texture = MotionEngine.GetModule<ToolsPackManager>().GetToolsPackWindowBtImage(gName);
|
ico.texture = MotionEngine.GetModule<ToolsPackManager>().GetToolsPackWindowBtImage(gName);
|
||||||
numberText.text = $"x{gameNumber.ToString()}";
|
numberText.text = $"x{gameNumber.ToString()}";
|
||||||
|
|
||||||
_toolsPackWindowItemBtModels.Add(index,btName);
|
_toolsPackWindowItemBtModels.Add(index, btName);
|
||||||
|
|
||||||
// if (MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.工具间)
|
// if (MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.工具间)
|
||||||
// {
|
// {
|
||||||
|
|
@ -115,7 +115,7 @@ namespace ToolsPack
|
||||||
|
|
||||||
public int GetIndex()
|
public int GetIndex()
|
||||||
{
|
{
|
||||||
return index;
|
return _toolsPackWindowItemBtModels.Count - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -124,17 +124,27 @@ namespace ToolsPack
|
||||||
return gameNumber;
|
return gameNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddGameNumber( string btName, int index)
|
public void AddGameNumber(string btName, int index)
|
||||||
{
|
{
|
||||||
gameNumber++;
|
gameNumber++;
|
||||||
numberText.text = $"x{gameNumber.ToString()}";
|
numberText.text = $"x{gameNumber.ToString()}";
|
||||||
_toolsPackWindowItemBtModels.Add(index,btName);
|
_toolsPackWindowItemBtModels.Add(index, btName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public void AddGameNumber(string btName, int index, ModelTypeEnum modelTypeEnum)
|
||||||
|
// {
|
||||||
|
// _modelTypeEnum = modelTypeEnum;
|
||||||
|
// gameNumber++;
|
||||||
|
// numberText.text = $"x{gameNumber.ToString()}";
|
||||||
|
// _toolsPackWindowItemBtModels.Add(index, btName);
|
||||||
|
// }
|
||||||
|
|
||||||
public void ReduceGameNumber()
|
public void ReduceGameNumber()
|
||||||
{
|
{
|
||||||
|
string na = this.gameObject.name;
|
||||||
gameNumber--;
|
gameNumber--;
|
||||||
numberText.text = $"x{gameNumber.ToString()}";
|
numberText.text = $"x{gameNumber.ToString()}";
|
||||||
|
_toolsPackWindowItemBtModels.Remove(_toolsPackWindowItemBtModels.Count - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +116,7 @@ namespace ToolsPack
|
||||||
ToolsPackWindowItemBtComponent btComponent1;
|
ToolsPackWindowItemBtComponent btComponent1;
|
||||||
if (_toolsNameTemp.TryGetValue(to, out btComponent1))
|
if (_toolsNameTemp.TryGetValue(to, out btComponent1))
|
||||||
{
|
{
|
||||||
btComponent1.AddGameNumber(to, tp.GetIndex());
|
btComponent1.AddGameNumber(v.Key, tp.GetIndex());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 960 B |
|
|
@ -0,0 +1,127 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a6de60d73ddc8784f9248fa0fbe38747
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMipmapLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 27 KiB |
Loading…
Reference in New Issue