This commit is contained in:
jiangbingqing 2024-08-13 09:28:15 +08:00
commit 6614870952
30 changed files with 844 additions and 139 deletions

Binary file not shown.

View File

@ -3718,6 +3718,21 @@ MonoBehaviour:
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
- m_Index: 9609
m_Metrics:
m_Width: 71.8125
m_Height: 82.34375
m_HorizontalBearingX: 9.1875
m_HorizontalBearingY: 75.328125
m_HorizontalAdvance: 90
m_GlyphRect:
m_X: 109
m_Y: 3324
m_Width: 72
m_Height: 84
m_Scale: 1
m_AtlasIndex: 0
m_ClassDefinitionType: 0
m_CharacterTable:
- m_ElementType: 1
m_Unicode: 10
@ -4679,6 +4694,10 @@ MonoBehaviour:
m_Unicode: 28165
m_GlyphIndex: 16905
m_Scale: 1
- m_ElementType: 1
m_Unicode: 20869
m_GlyphIndex: 9609
m_Scale: 1
m_AtlasTextures:
- {fileID: 664730538444645797}
m_AtlasTextureIndex: 0
@ -5633,6 +5652,10 @@ MonoBehaviour:
m_Y: 3417
m_Width: 102
m_Height: 102
- m_X: 99
m_Y: 3314
m_Width: 91
m_Height: 103
m_FreeGlyphRects:
- m_X: 42
m_Y: 97
@ -6358,10 +6381,6 @@ MonoBehaviour:
m_Y: 3210
m_Width: 3998
m_Height: 2
- m_X: 102
m_Y: 3210
m_Width: 3993
m_Height: 885
- m_X: 99
m_Y: 3008
m_Width: 4
@ -6378,10 +6397,18 @@ MonoBehaviour:
m_Y: 3519
m_Width: 4095
m_Height: 576
- m_X: 99
m_Y: 3314
m_Width: 3996
m_Height: 103
- m_X: 102
m_Y: 3210
m_Width: 3993
m_Height: 104
- m_X: 102
m_Y: 3417
m_Width: 3993
m_Height: 678
- m_X: 190
m_Y: 3210
m_Width: 3905
m_Height: 885
m_fontInfo:
Name:
PointSize: 0

View File

@ -25,7 +25,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6621331633947903829}
m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068}
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
m_LocalPosition: {x: -3.133, y: -1.2996001, z: -0.663}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -33,7 +33,7 @@ Transform:
- {fileID: 5015983456952407212}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
--- !u!65 &8517339813375714770
BoxCollider:
m_ObjectHideFlags: 0
@ -62,6 +62,8 @@ MonoBehaviour:
toolId: 0
toolName:
toolOrDeviceOrMaterial: 0
_highlight: {fileID: 6019866941398731266}
IsClick: 1
--- !u!1001 &4762243372509246279
PrefabInstance:
m_ObjectHideFlags: 0
@ -124,3 +126,175 @@ Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 3ad5f28787401de46ae2b0c488a08446, type: 3}
m_PrefabInstance: {fileID: 4762243372509246279}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5681162065009577494 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 3ad5f28787401de46ae2b0c488a08446, type: 3}
m_PrefabInstance: {fileID: 4762243372509246279}
m_PrefabAsset: {fileID: 0}
--- !u!114 &6019866941398731266
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5681162065009577494}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
m_Name:
m_EditorClassIdentifier:
profile: {fileID: 0}
profileSync: 0
previewInEditor: 1
camerasLayerMask:
serializedVersion: 2
m_Bits: 4294967295
effectGroup: 0
effectGroupLayer:
serializedVersion: 2
m_Bits: 4294967295
effectNameFilter:
combineMeshes: 0
alphaCutOff: 0
cullBackFaces: 1
ignoreObjectVisibility: 0
reflectionProbes: 0
GPUInstancing: 1
depthClip: 0
cameraDistanceFade: 0
cameraDistanceFadeNear: 0
cameraDistanceFadeFar: 1000
normalsOption: 0
ignore: 0
_highlighted: 0
fadeInDuration: 0
fadeOutDuration: 0
flipY: 0
constantWidth: 1
subMeshMask: -1
overlay: 0
overlayMode: 0
overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
overlayAnimationSpeed: 1
overlayMinIntensity: 0.5
overlayBlending: 1
overlayTexture: {fileID: 0}
overlayTextureUVSpace: 0
overlayTextureScale: 1
outline: 1
outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, a: 1}
outlineColorStyle: 0
outlineGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
outlineGradientInLocalSpace: 0
outlineWidth: 0.45
outlineQuality: 3
outlineDownsampling: 2
outlineVisibility: 0
glowBlendMode: 0
outlineOptimalBlit: 1
outlineBlitDebug: 0
outlineIndependent: 0
glow: 0.48
glowWidth: 0.4
glowQuality: 3
glowDownsampling: 2
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
glowDithering: 1
glowMagicNumber1: 0.75
glowMagicNumber2: 0.5
glowAnimationSpeed: 1
glowVisibility: 0
glowOptimalBlit: 1
glowBlitDebug: 0
glowBlendPasses: 1
glowPasses:
- offset: 4
alpha: 0.1
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 3
alpha: 0.2
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 2
alpha: 0.3
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 1
alpha: 0.4
color: {r: 0.64, g: 1, b: 0, a: 1}
glowIgnoreMask: 0
innerGlow: 0
innerGlowWidth: 1
innerGlowColor: {r: 1, g: 1, b: 1, a: 1}
innerGlowVisibility: 0
targetFX: 0
targetFXTexture: {fileID: 0}
targetFXColor: {r: 1, g: 1, b: 1, a: 1}
targetFXCenter: {fileID: 0}
targetFXRotationSpeed: 50
targetFXInitialScale: 4
targetFXEndScale: 1.5
targetFXScaleToRenderBounds: 1
targetFXAlignToGround: 0
targetFXFadePower: 32
targetFXGroundMaxDistance: 10
targetFXGroundLayerMask:
serializedVersion: 2
m_Bits: 4294967295
targetFXTransitionDuration: 0.5
targetFXStayDuration: 1.5
targetFXVisibility: 1
seeThrough: 2
seeThroughOccluderMask:
serializedVersion: 2
m_Bits: 4294967295
seeThroughOccluderThreshold: 0.3
seeThroughOccluderMaskAccurate: 0
seeThroughOccluderCheckInterval: 1
seeThroughOccluderCheckIndividualObjects: 0
seeThroughDepthOffset: 0
seeThroughMaxDepth: 0
seeThroughIntensity: 0.8
seeThroughTintAlpha: 0.5
seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1}
seeThroughNoise: 1
seeThroughBorder: 0
seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1}
seeThroughBorderOnly: 0
seeThroughBorderWidth: 0.45
seeThroughOrdered: 0
seeThroughTexture: {fileID: 0}
seeThroughTextureUVSpace: 0
seeThroughTextureScale: 1
rmsCount: 6
hitFxInitialIntensity: 0
hitFxMode: 0
hitFxFadeOutDuration: 0.25
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
hitFxRadius: 0.5

View File

@ -13,7 +13,7 @@ GameObject:
- component: {fileID: 2557768358979172441}
m_Layer: 0
m_Name: "\u5265\u7EBF\u94B3"
m_TagString: Untagged
m_TagString: Tools
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -62,6 +62,8 @@ MonoBehaviour:
toolId: 0
toolName:
toolOrDeviceOrMaterial: 0
_highlight: {fileID: 2557768358135893732}
IsClick: 1
--- !u!1001 &2557768359515585564
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -13,7 +13,7 @@ GameObject:
- component: {fileID: 8642374616707477862}
m_Layer: 0
m_Name: "\u56FD\u7F51\u5B89\u5168\u5E3D"
m_TagString: Untagged
m_TagString: Tools
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -62,6 +62,8 @@ MonoBehaviour:
toolId: 0
toolName:
toolOrDeviceOrMaterial: 0
_highlight: {fileID: 8642374617292311849}
IsClick: 1
--- !u!1001 &8642374617351758584
PrefabInstance:
m_ObjectHideFlags: 0
@ -117,6 +119,10 @@ PrefabInstance:
propertyPath: m_Name
value: "\u56FD\u7F51\u5B89\u5168\u5E3D (2)"
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 2b8b4bc7f816fb645abf507b67d18921, type: 3}
propertyPath: m_TagString
value: Tools
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2b8b4bc7f816fb645abf507b67d18921, type: 3}
--- !u!4 &8098976887468442899 stripped

View File

@ -62,7 +62,8 @@ MonoBehaviour:
toolId: 0
toolName:
toolOrDeviceOrMaterial: 0
_highlight: {fileID: 0}
_highlight: {fileID: 77038123424866922}
IsClick: 1
--- !u!1001 &77038122133901991
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -50,7 +50,8 @@ MonoBehaviour:
toolId: 0
toolName:
toolOrDeviceOrMaterial: 0
_highlight: {fileID: 0}
_highlight: {fileID: 3421347697730200869}
IsClick: 1
--- !u!65 &5298069477168308409
BoxCollider:
m_ObjectHideFlags: 0

View File

@ -25,7 +25,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776503018750407771}
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: -3.233, y: -0.40200007, z: -3.732}
m_LocalScale: {x: 0.1, y: 0.10000002, z: 0.10000002}
m_ConstrainProportionsScale: 0
@ -33,7 +33,7 @@ Transform:
- {fileID: 2675290992447714979}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!65 &8524820740553488882
BoxCollider:
m_ObjectHideFlags: 0
@ -62,6 +62,8 @@ MonoBehaviour:
toolId: 0
toolName:
toolOrDeviceOrMaterial: 0
_highlight: {fileID: 2497865596420142133}
IsClick: 1
--- !u!1001 &2497865597255717192
PrefabInstance:
m_ObjectHideFlags: 0
@ -141,19 +143,6 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 784380bbef41cd24cb4180c115d98cf4, type: 3}
m_PrefabInstance: {fileID: 2497865597255717192}
m_PrefabAsset: {fileID: 0}
--- !u!65 &2497865596420142130
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3344866478516448281}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.44000262, y: 0.44000274, z: 0.10000002}
m_Center: {x: 0, y: 0.0000038146973, z: 0.050000962}
--- !u!114 &2497865596420142133
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -50,7 +50,8 @@ MonoBehaviour:
toolId: 0
toolName:
toolOrDeviceOrMaterial: 0
_highlight: {fileID: 0}
_highlight: {fileID: 7719931385408198085}
IsClick: 1
--- !u!65 &2292098275725943769
BoxCollider:
m_ObjectHideFlags: 0

View File

@ -25,7 +25,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3945920568849990411}
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0.315, y: -1.746, z: -2.425}
m_LocalScale: {x: 0.01, y: 0.009999998, z: 0.009999998}
m_ConstrainProportionsScale: 0
@ -33,7 +33,7 @@ Transform:
- {fileID: 7572810652168399410}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!114 &3056773142408046311
MonoBehaviour:
m_ObjectHideFlags: 0
@ -49,6 +49,8 @@ MonoBehaviour:
toolId: 0
toolName:
toolOrDeviceOrMaterial: 0
_highlight: {fileID: 7967639972513944141}
IsClick: 1
--- !u!65 &7642060814474931475
BoxCollider:
m_ObjectHideFlags: 0
@ -136,19 +138,6 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: f310675c477170a4096cf4b858befe4b, type: 3}
m_PrefabInstance: {fileID: 7967639972036988377}
m_PrefabAsset: {fileID: 0}
--- !u!65 &7967639972513944130
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7085243613394432136}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 30.347136, y: 30.458006, z: 34.59421}
m_Center: {x: 0, y: 0.000015258789, z: 17.252329}
--- !u!114 &7967639972513944141
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -49,7 +49,8 @@ MonoBehaviour:
toolId: 0
toolName:
toolOrDeviceOrMaterial: 0
_highlight: {fileID: 0}
_highlight: {fileID: 1745229904819187846}
IsClick: 1
--- !u!65 &2828524944087783442
BoxCollider:
m_ObjectHideFlags: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -0,0 +1,159 @@
fileFormatVersion: 2
guid: 6346632192b53b04d8a62f4e07d4aeb0
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: 2
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
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: 1
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,6 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7924161949258944695
--- !u!1 &4239231589677207246
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -8,9 +8,9 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7924161949258944694}
- component: {fileID: 7924161949258944712}
- component: {fileID: 7924161949258944713}
- component: {fileID: 4239231589677207247}
- component: {fileID: 4239231589677207217}
- component: {fileID: 4239231589677207216}
m_Layer: 5
m_Name: ToolAndMeterialItem
m_TagString: Untagged
@ -18,18 +18,20 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7924161949258944694
--- !u!224 &4239231589677207247
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7924161949258944695}
m_GameObject: {fileID: 4239231589677207246}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 1103842610257818206}
- {fileID: 8215525817944585444}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -38,21 +40,21 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7924161949258944712
--- !u!222 &4239231589677207217
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7924161949258944695}
m_GameObject: {fileID: 4239231589677207246}
m_CullTransparentMesh: 1
--- !u!114 &7924161949258944713
--- !u!114 &4239231589677207216
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7924161949258944695}
m_GameObject: {fileID: 4239231589677207246}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
@ -76,3 +78,204 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &4372117883866901743
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1103842610257818206}
- component: {fileID: 4678192074515838294}
- component: {fileID: 3534060011449287153}
m_Layer: 5
m_Name: countText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1103842610257818206
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4372117883866901743}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4239231589677207247}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -10.9, y: 10.5}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4678192074515838294
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4372117883866901743}
m_CullTransparentMesh: 1
--- !u!114 &3534060011449287153
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4372117883866901743}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 11
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
--- !u!1 &7609248286363545378
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8215525817944585444}
- component: {fileID: 7822759280540398470}
- component: {fileID: 8247131394908315687}
- component: {fileID: 9144319166100695387}
m_Layer: 5
m_Name: deleteBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8215525817944585444
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609248286363545378}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4239231589677207247}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -10, y: -9.3}
m_SizeDelta: {x: 15, y: 15}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7822759280540398470
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609248286363545378}
m_CullTransparentMesh: 1
--- !u!114 &8247131394908315687
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609248286363545378}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, 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: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &9144319166100695387
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609248286363545378}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 8247131394908315687}
m_OnClick:
m_PersistentCalls:
m_Calls: []

View File

@ -439,6 +439,18 @@ PrefabInstance:
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 664557115506198354, guid: c589cfa8e2c0c004ca8727f8a9546ace, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 664557115506198354, guid: c589cfa8e2c0c004ca8727f8a9546ace, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 664557115506198354, guid: c589cfa8e2c0c004ca8727f8a9546ace, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 781378853607839230, guid: c589cfa8e2c0c004ca8727f8a9546ace, type: 3}
propertyPath: m_Pivot.x
value: 0.5

View File

@ -739,7 +739,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 18e3d012d42595243afc97129c371624, type: 3}
propertyPath: m_RootOrder
value: 21
value: 20
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 18e3d012d42595243afc97129c371624, type: 3}
propertyPath: m_LocalPosition.x
@ -1404,7 +1404,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_RootOrder
value: 15
value: 14
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalPosition.x
@ -1840,7 +1840,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 51570ff2bf185534fa008185c8cbadcf, type: 3}
propertyPath: m_RootOrder
value: 23
value: 22
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 51570ff2bf185534fa008185c8cbadcf, type: 3}
propertyPath: m_LocalPosition.x
@ -2499,7 +2499,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8488133114798062186, guid: 7e5755c1fdd628b4a8505213826ebf4c, type: 3}
propertyPath: m_RootOrder
value: 19
value: 18
objectReference: {fileID: 0}
- target: {fileID: 8488133114798062186, guid: 7e5755c1fdd628b4a8505213826ebf4c, type: 3}
propertyPath: m_LocalPosition.x
@ -2557,7 +2557,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_RootOrder
value: 24
value: 23
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_LocalPosition.x
@ -2704,7 +2704,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 784380bbef41cd24cb4180c115d98cf4, type: 3}
propertyPath: m_RootOrder
value: 16
value: 15
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 784380bbef41cd24cb4180c115d98cf4, type: 3}
propertyPath: m_LocalScale.y
@ -3250,6 +3250,17 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1129306887 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7719931385408198085, guid: 2156e2fd42e37ee40a9c53abb6dd458f, type: 3}
m_PrefabInstance: {fileID: 7719931384355802818}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1131176226
GameObject:
m_ObjectHideFlags: 0
@ -4364,7 +4375,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 3ad5f28787401de46ae2b0c488a08446, type: 3}
propertyPath: m_RootOrder
value: 26
value: 25
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 3ad5f28787401de46ae2b0c488a08446, type: 3}
propertyPath: m_LocalPosition.x
@ -4611,7 +4622,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 784380bbef41cd24cb4180c115d98cf4, type: 3}
propertyPath: m_RootOrder
value: 18
value: 17
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 784380bbef41cd24cb4180c115d98cf4, type: 3}
propertyPath: m_LocalScale.y
@ -4953,7 +4964,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 784380bbef41cd24cb4180c115d98cf4, type: 3}
propertyPath: m_RootOrder
value: 17
value: 16
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 784380bbef41cd24cb4180c115d98cf4, type: 3}
propertyPath: m_LocalScale.y
@ -5342,7 +5353,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: f310675c477170a4096cf4b858befe4b, type: 3}
propertyPath: m_RootOrder
value: 20
value: 19
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f310675c477170a4096cf4b858befe4b, type: 3}
propertyPath: m_LocalScale.y
@ -5647,7 +5658,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5690046137980526191, guid: 6beefba92932d9d43ae4e3a7513a91e7, type: 3}
propertyPath: m_RootOrder
value: 22
value: 21
objectReference: {fileID: 0}
- target: {fileID: 5690046137980526191, guid: 6beefba92932d9d43ae4e3a7513a91e7, type: 3}
propertyPath: m_LocalPosition.x
@ -5891,7 +5902,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 5376839146013080726, guid: 98ce40efda21ce94eb0ee07ce95f5dbd, type: 3}
propertyPath: m_RootOrder
value: 25
value: 24
objectReference: {fileID: 0}
- target: {fileID: 5376839146013080726, guid: 98ce40efda21ce94eb0ee07ce95f5dbd, type: 3}
propertyPath: m_LocalPosition.x
@ -5951,13 +5962,17 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 983777793}
m_Modifications:
- target: {fileID: 2663764905760382546, guid: 2156e2fd42e37ee40a9c53abb6dd458f, type: 3}
propertyPath: _highlight
value:
objectReference: {fileID: 1129306887}
- target: {fileID: 7175692158753146328, guid: 2156e2fd42e37ee40a9c53abb6dd458f, type: 3}
propertyPath: m_Name
value: "\u7EDD\u7F18\u87BA\u4E1D\u5200"
objectReference: {fileID: 0}
- target: {fileID: 8478404885969365012, guid: 2156e2fd42e37ee40a9c53abb6dd458f, type: 3}
propertyPath: m_RootOrder
value: 14
value: 13
objectReference: {fileID: 0}
- target: {fileID: 8478404885969365012, guid: 2156e2fd42e37ee40a9c53abb6dd458f, type: 3}
propertyPath: m_LocalPosition.x

View File

@ -1,6 +1,7 @@
public class TB_ToolAndMaterial
{
public int id;
public int systemID;
public string objName;
public int type;
public string prefabName;

View File

@ -0,0 +1,10 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ToolAndMaterialData
{
public string objName;
public int type;
public uint count;
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ccf50554da1943a4d8cf8227c01f3097
guid: 1312760d4ad36494eae81349ddf0e86d
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -47,7 +47,6 @@ public class DataManager : BaseManager<DataManager>
/// </summary>
private Dictionary<int, TB_ToolAndMaterial> toolAndMaterialDic = new Dictionary<int, TB_ToolAndMaterial>();
/// <summary>
/// 初始化
@ -67,6 +66,7 @@ public class DataManager : BaseManager<DataManager>
{
return deviceTypeDic;
}
/// <summary>
/// 获取当前系统所有的方案
/// </summary>
@ -76,12 +76,31 @@ public class DataManager : BaseManager<DataManager>
var allSchemeList = new List<TB_Scheme>();
foreach (var item in schemeDic.Values)
{
if (item.systemId==GameManager.ProcessMgr.id)
if (item.systemId == GameManager.ProcessMgr.id)
allSchemeList.Add(item);
}
return allSchemeList;
}
/// <summary>
/// 获取当前系统全部工器具和材料
/// </summary>
/// <returns></returns>
public List<TB_ToolAndMaterial> GetCurrentSystemToolAndMaterials()
{
var currentSystemToolAndMaterials = new List<TB_ToolAndMaterial>();
foreach (var item in toolAndMaterialDic.Values)
{
if (item.systemID == GameManager.ProcessMgr.id)
{
currentSystemToolAndMaterials.Add(item);
}
}
return currentSystemToolAndMaterials;
}
/// <summary>
/// 获取D_Scheme
/// </summary>

View File

@ -119,7 +119,10 @@ public class GameManager : SingletonAutoMono<GameManager>
ReportMgr = ReportManager.Instance;
HandsOnTrainingMgr = HandsOnTrainingMgr.Instance;
RunModelMgr = RunModelMgr.Instance;
ToolAndmaterialMgr = ToolAndmaterialMgr.Instance;
PacksackBagMgr = PacksackBagMgr.Instance;
DataMgr.Init();
ToolAndmaterialMgr.Init();
InitData();
}

View File

@ -1,10 +1,60 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 负责工具材料包管理
/// </summary>
public class PacksackBagMgr : BaseManager<PacksackBagMgr>
{
//包里用了哪些工器具
private readonly Dictionary<string, ToolAndMaterialData> toolAndMaterialDic =
new Dictionary<string, ToolAndMaterialData>();
private PacksackBagMgr()
{
}
public Dictionary<string, ToolAndMaterialData> GetCurrentBagData()
{
return toolAndMaterialDic;
}
}
/// <summary>
/// 添加一个工器具或材料
/// </summary>
/// <param name="name"></param>
public void AddOneToolOrMater(string name)
{
if (toolAndMaterialDic.ContainsKey(name))
{
toolAndMaterialDic[name].count++;
}
else
{
//从配置里得知是tool or Material
var tempToolOrMaterType = GameManager.ToolAndmaterialMgr.GetObjType(name);
if (tempToolOrMaterType == -1) return;
var tempToolAndMaterData = new ToolAndMaterialData()
{ count = 1, objName = name, type = tempToolOrMaterType };
toolAndMaterialDic.Add(name, tempToolAndMaterData);
}
}
/// <summary>
/// 移除一个工器具或材料
/// </summary>
/// <param name="name"></param>
public void RemoveOneToolOrMater(string name)
{
if (toolAndMaterialDic.ContainsKey(name))
{
var toolAndMaterCount = toolAndMaterialDic[name].count--;
if (toolAndMaterCount <= 0)
{
toolAndMaterialDic.Remove(name);
}
}
}
}

View File

@ -1,10 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 正在使用的工具/材料管理类
/// </summary>
public class ToolAndmaterialMgr : BaseManager<ToolAndmaterialMgr>
{
}
//该系统所需要使用的全部工器具和材料
public List<TB_ToolAndMaterial> toolAndMaterialList;
private ToolAndmaterialMgr()
{
}
public void Init()
{
toolAndMaterialList = GameManager.DataMgr.GetCurrentSystemToolAndMaterials();
}
public string GetIconSpriteName(string objName)
{
var tempObj= toolAndMaterialList.Find(o => o.objName == objName);
if (tempObj!=null)
{
return tempObj.iconSpriteName;
}
else
{
return null;
}
}
public int GetObjType(string objName)
{
var tempObj= toolAndMaterialList.Find(o => o.objName == objName);
if (tempObj!=null)
{
return tempObj.type;
}
else
{
return -1;
}
}
}

View File

@ -20,6 +20,7 @@ public abstract class BaseToolOrDevice : MonoBehaviour
/// </summary>
public E_ToolOrDeviceOrMaterials toolOrDeviceOrMaterial;
public HighlightEffect _highlight;
public bool IsClick = true;
private void Start()
{
_highlight = GetComponentInChildren<HighlightEffect>();

View File

@ -13,8 +13,14 @@ public class Tool_SelectComponent : BaseToolOrDevice
public override void OnDown()
{
base.OnDown();
////렴흙교관
if (IsClick)
{
//묏야츰냔뵨묏야렴흙묏야움
GameManager.PacksackBagMgr.AddOneToolOrMater(gameObject.name);
this.gameObject.SetActive(false);
}
}
public override void OnExit()

View File

@ -1,36 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UI_DeviceItem : BaseItem
{
/// <summary>
/// 设备Id
/// </summary>
public int deviceId;
protected override void OnClick(string btnName)
{
switch (btnName)
{
case "Button_Device":
GameManager.RunModelMgr.deviceId = deviceId;
GameManager.UIMgr.ShowPanel<UI_LoadingPanel>(E_UI_Layer.System, (panel) =>
{
panel.Init();
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.1f);
GameManager.ScenesMgr.LoadSceneAsyn("03_OfficeScene", () =>
{
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.4f);
GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Mid, (panel) =>
{
panel.Init();
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.5f);
GameManager.UIMgr.HidePanel<UI_SelectDevicePanel>();
});
});
});
break;
}
}
}

View File

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
@ -85,4 +86,15 @@ public class UI_MainTitlePanel : BasePanel
break;
}
}
[Button]
public void Test1()
{
GameManager.UIMgr.ShowPanel<UI_ToolAndMaterialPanel>();
}
[Button]
public void Test2()
{
GameManager.PacksackBagMgr.AddOneToolOrMater("万用表");
}
}

View File

@ -1,7 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using Sirenix.OdinInspector;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
@ -44,16 +43,16 @@ public class UI_SelectDevicePanel : BasePanel
//按钮的父节点是标题的父节点content
deviceItemBtn.transform.parent = titleItem.transform.parent;
deviceItemBtn.GetComponentInChildren<TextMeshProUGUI>().text = x.schemeName;
var deviceBtnAComponent = deviceItemBtn.GetComponent<Button>();
deviceItemBtn.name = x.id.ToString();
AddEventForDeviceBtn(deviceBtnAComponent, x.deviceMap);
AddEventForDeviceBtn(deviceBtnAComponent, x.deviceMap, x.id);
});
}
}
}
}
private void AddEventForDeviceBtn(Button deviceBtnAComponent, string mapName)
private void AddEventForDeviceBtn(Button deviceBtnAComponent, string mapName,int schemeID)
{
GameManager.UIMgr.AddEventTriggerListener(deviceBtnAComponent, EventTriggerType.PointerEnter,
_ =>
@ -71,14 +70,11 @@ public class UI_SelectDevicePanel : BasePanel
});
deviceBtnAComponent.onClick.AddListener(() =>
{
GameManager.RunModelMgr.deviceId = int.Parse(deviceBtnAComponent.name);
GameManager.RunModelMgr.deviceId = schemeID;
GameManager.UIMgr.ShowPanel<UI_LoadingPanel>(E_UI_Layer.System, (panel) =>
{
GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Bot, (panel) =>
{
panel.Init();
});
GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Bot, (panel) => { panel.Init(); });
panel.Init();
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.1f);
GameManager.ScenesMgr.LoadSceneAsyn("03_OfficeScene", () =>
@ -103,15 +99,5 @@ public class UI_SelectDevicePanel : BasePanel
break;
}
}
[Button]
public void Test1()
{
foreach (var VARIABLE in allSchemeName)
{
Debug.LogError(VARIABLE.deviceMap + VARIABLE.schemeName);
}
Debug.LogError(allDeviceTypes.Count);
}
}

View File

@ -1,4 +1,6 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UI_ToolAndMaterialPanel : BasePanel
{
@ -6,23 +8,56 @@ public class UI_ToolAndMaterialPanel : BasePanel
{
}
void Start()
{
}
public override void ShowMe()
{
CreatItem(0); //默认打开显示工器具
}
public override void HideMe()
{
}
private void CreatItem(int type)
{
var bagData = GameManager.PacksackBagMgr.GetCurrentBagData();
foreach (var toolAndMaterialData in bagData.Values)
{
if (toolAndMaterialData.type != type)
{
continue;
}
string iconName = GameManager.ToolAndmaterialMgr.GetIconSpriteName(toolAndMaterialData.objName);
if (iconName != null)
{
var toolAndMaterItem = GameManager.ResourcesMgr.Load<GameObject>(Const.UI_Item +
"UI_ToolAndMaterialPanel/" +
"ToolAndMeterialItem");
toolAndMaterItem.GetComponent<Image>().sprite =
GameManager.ResourcesMgr.Load<Sprite>(Const.TitleSpritePath + iconName);
toolAndMaterItem.GetComponentInChildren<Text>().text = toolAndMaterialData.count.ToString();
toolAndMaterItem.transform.parent = GetControl<ScrollRect>("itemScrollView").content;
}
}
}
protected override void OnClick(string btnName)
{
switch (btnName)
{
case "":
case "closeBtn":
GameManager.UIMgr.HidePanel<UI_ToolAndMaterialPanel>();
break;
case "toolBtn":
CreatItem(0);
break;
case "deviceBtn":
CreatItem(1);
break;
default:
break;