新增描述 新增打字机效果 新增UI

HDRP
Yogi 2025-01-09 20:48:50 +08:00
parent 27503020e2
commit 317553699e
9 changed files with 1016 additions and 44 deletions

View File

@ -0,0 +1,152 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2342483029943171211
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 660188924861833485}
- component: {fileID: 9143897243806116271}
- component: {fileID: 388994958241096818}
- component: {fileID: 5973540162548104450}
m_Layer: 5
m_Name: TMPTypewriter
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &660188924861833485
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2342483029943171211}
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: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 112.54}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9143897243806116271
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2342483029943171211}
m_CullTransparentMesh: 1
--- !u!114 &388994958241096818
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2342483029943171211}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: ABCABCABCABCABCABCABCABCABCABCABC
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 4e78516468f72524eb86e1e1ce9d8ce2, type: 2}
m_sharedMaterial: {fileID: 3867646050661814019, guid: 4e78516468f72524eb86e1e1ce9d8ce2, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &5973540162548104450
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2342483029943171211}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1e94de55d65e21141ac340e779f2bc67, type: 3}
m_Name:
m_EditorClassIdentifier:
animTotalTime: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8b4d87677256ae743b2b923a887d2d6a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -245,6 +245,81 @@ Transform:
m_Children: []
m_Father: {fileID: 604712594}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &251978103
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 251978104}
- component: {fileID: 251978106}
- component: {fileID: 251978105}
m_Layer: 5
m_Name: bg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &251978104
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 251978103}
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: 1311624461}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -0.000030517578, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &251978105
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 251978103}
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: 0}
m_Type: 0
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!222 &251978106
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 251978103}
m_CullTransparentMesh: 1
--- !u!1 &374462219 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 846709959441001609, guid: 741d148cf7fe4db4aa6687915c30f4ca, type: 3}
@ -255,6 +330,108 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 7158789350381242160, guid: 741d148cf7fe4db4aa6687915c30f4ca, type: 3}
m_PrefabInstance: {fileID: 6664335491598370550}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &475669546
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1521878370}
m_Modifications:
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_SizeDelta.y
value: 112.54
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2342483029943171211, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_Name
value: TMPTypewriter (2)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
--- !u!224 &475669547 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
m_PrefabInstance: {fileID: 475669546}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &495605761
PrefabInstance:
m_ObjectHideFlags: 0
@ -303,10 +480,38 @@ PrefabInstance:
propertyPath: "config.Cars.Array.data[9].\u8F66\u8F86\u57FA\u7840\u7269\u4F53"
value:
objectReference: {fileID: 523599165}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6.Array.size"
value: 1
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u90E8\u4EF6\u7C7B\u578B\u540D"
value: "\u6D4B\u8BD5\u90E8\u4EF6\u7C7B\u578B"
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.size"
value: 2
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[1].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.size"
value: 2
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[0].\u7269\u4F53"
value:
objectReference: {fileID: 1839736679}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[1].\u7269\u4F53"
value:
objectReference: {fileID: 1116573464}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[1].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[0].\u7269\u4F53"
value:
objectReference: {fileID: 717401178}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[1].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[1].\u7269\u4F53"
value:
objectReference: {fileID: 717401178}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[1].\u8F66\u8F86\u7EC4\u4EF6.Array.data[1].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[0].\u7269\u4F53"
value:
@ -355,6 +560,46 @@ PrefabInstance:
propertyPath: "config.Cars.Array.data[9].\u8F66\u8F86\u7EC4\u4EF6.Array.data[1].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[1].\u7269\u4F53"
value:
objectReference: {fileID: 1732073838}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[0].\u90E8\u4EF6\u540D"
value: "\u6D4B\u8BD51"
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[1].\u90E8\u4EF6\u540D"
value: "\u6D4B\u8BD52"
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[1].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[1].\u90E8\u4EF6\u540D"
value: RX04FrontBumper
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[0].\u7EC4\u4EF6\u63CF\u8FF0"
value: "\u6D4B\u8BD51 \u7684\u63CF\u8FF0"
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[1].\u7EC4\u4EF6\u63CF\u8FF0"
value: "\u6D4B\u8BD52 \u7684\u63CF\u8FF0"
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[1].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[0].\u7EC4\u4EF6\u63CF\u8FF0"
value: "\u6D4B\u8BD5\u63CF\u8FF03"
objectReference: {fileID: 0}
- target: {fileID: 162263565986933577, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: "config.Cars.Array.data[1].\u8F66\u8F86\u7EC4\u4EF6.Array.data[0].\u8F66\u8F86\u7EC4\u4EF6\u5408\u96C6.Array.data[1].\u7EC4\u4EF6\u63CF\u8FF0"
value: "\u6D4B\u8BD5\u63CF\u8FF04"
objectReference: {fileID: 0}
- target: {fileID: 850224136379002884, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: m_AnchoredPosition.x
value: 61.100098
objectReference: {fileID: 0}
- target: {fileID: 850224136379002884, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: m_AnchoredPosition.y
value: -53.099976
objectReference: {fileID: 0}
- target: {fileID: 1396823704353429313, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: m_AnchoredPosition.x
value: -39.399902
objectReference: {fileID: 0}
- target: {fileID: 3068149285083595345, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: m_AnchorMax.x
value: 0
@ -369,8 +614,16 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3579278319193455115, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: m_Value
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4392250051589012096, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: typewriterPrefab
value:
objectReference: {fileID: 5973540162548104450, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
- target: {fileID: 4392250051589012096, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: componentTextParent
value:
objectReference: {fileID: 1521878370}
- target: {fileID: 4467637909231862192, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0.000029087067
@ -407,6 +660,10 @@ PrefabInstance:
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8709297164818035694, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: m_AnchoredPosition.y
value: 46.30005
objectReference: {fileID: 0}
- target: {fileID: 8726575655474810633, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@ -461,9 +718,17 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 6461988665235398496, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
insertIndex: -1
addedObject: {fileID: 1311624461}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
--- !u!224 &495605762 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 6461988665235398496, guid: fbd98df1f6ab257439fff069ae185281, type: 3}
m_PrefabInstance: {fileID: 495605761}
m_PrefabAsset: {fileID: 0}
--- !u!1 &503373287 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4685081995603142786, guid: 741d148cf7fe4db4aa6687915c30f4ca, type: 3}
@ -727,6 +992,108 @@ Transform:
m_Children: []
m_Father: {fileID: 604712594}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &868151511
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1521878370}
m_Modifications:
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_SizeDelta.y
value: 112.54
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2342483029943171211, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_Name
value: TMPTypewriter (1)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
--- !u!224 &868151512 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
m_PrefabInstance: {fileID: 868151511}
m_PrefabAsset: {fileID: 0}
--- !u!1 &961739749
GameObject:
m_ObjectHideFlags: 0
@ -899,6 +1266,37 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 8356284782624027731, guid: 741d148cf7fe4db4aa6687915c30f4ca, type: 3}
m_PrefabInstance: {fileID: 6664335491598370550}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1116573464
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1116573465}
m_Layer: 0
m_Name: "\u6D4B\u8BD52 \u7269\u4F53(\u53EF\u5220\u9664)"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1116573465
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1116573464}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 325.05795, y: 518.5692, z: 0.46778685}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1160234425
GameObject:
m_ObjectHideFlags: 0
@ -958,6 +1356,43 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 2881457540606939832, guid: 741d148cf7fe4db4aa6687915c30f4ca, type: 3}
m_PrefabInstance: {fileID: 6664335491598370550}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1311624460
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1311624461}
m_Layer: 5
m_Name: ComponentText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1311624461
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1311624460}
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:
- {fileID: 251978104}
- {fileID: 1521878370}
m_Father: {fileID: 495605762}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: -87.538284}
m_SizeDelta: {x: 326.2, y: 498.7634}
m_Pivot: {x: 0, y: 0.5}
--- !u!1 &1314106973 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6720075688575866809, guid: 741d148cf7fe4db4aa6687915c30f4ca, type: 3}
@ -1059,6 +1494,71 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1468052971}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1521878369
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1521878370}
- component: {fileID: 1521878371}
m_Layer: 5
m_Name: Container
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1521878370
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1521878369}
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:
- {fileID: 1834466762}
- {fileID: 868151512}
- {fileID: 475669547}
m_Father: {fileID: 1311624461}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -0.000030517578, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1521878371
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1521878369}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &1618097287 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6009124418285241141, guid: 741d148cf7fe4db4aa6687915c30f4ca, type: 3}
@ -1074,6 +1574,42 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 227347454680306346, guid: 741d148cf7fe4db4aa6687915c30f4ca, type: 3}
m_PrefabInstance: {fileID: 6664335491598370550}
m_PrefabAsset: {fileID: 0}
--- !u!224 &1834466762 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
m_PrefabInstance: {fileID: 1166631445937393676}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1839736679
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1839736680}
m_Layer: 0
m_Name: "\u6D4B\u8BD51 \u7269\u4F53(\u53EF\u5220\u9664)"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1839736680
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839736679}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 325.05795, y: 518.5692, z: 0.46778685}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1865058040 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 23043ef14551ca64abe96361d38bf486, type: 3}
@ -1144,6 +1680,103 @@ Transform:
m_Children: []
m_Father: {fileID: 604712594}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1166631445937393676
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1521878370}
m_Modifications:
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_SizeDelta.y
value: 112.54
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 660188924861833485, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2342483029943171211, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
propertyPath: m_Name
value: TMPTypewriter
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8b4d87677256ae743b2b923a887d2d6a, type: 3}
--- !u!1 &3272307829670374435 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2382175725232307246, guid: 741d148cf7fe4db4aa6687915c30f4ca, type: 3}
@ -1216,3 +1849,5 @@ SceneRoots:
- {fileID: 604712594}
- {fileID: 6664335491598370550}
- {fileID: 495605761}
- {fileID: 1839736680}
- {fileID: 1116573465}

View File

@ -6,4 +6,5 @@ public class ComponentConfig
{
public string ;
public GameObject ;
public string ;
}

View File

@ -33,10 +33,12 @@ public class Main : MonoBehaviour
}
public UnityEvent<string> OnCarNameChanged, OnCarConfigChanged, OnCarComponentHighlight;
public event Action<CarConfig> OnCarChanged;
public event Action<CarComponentConfig> OnCarComponentConfigChanged;
public event Action<ComponentConfig,int > OnSwitchComponent;
private void HideAllCars()
{
foreach (var configCar in config.Cars)
@ -122,8 +124,8 @@ public class Main : MonoBehaviour
if (isActive)
{
UpdateCarName();
SwitchComponentConfig(0);
OnCarChanged?.Invoke(this.CurrentCar);
SwitchComponentConfig(0);
}
}
@ -143,6 +145,10 @@ public class Main : MonoBehaviour
this.OnCarConfigChanged.Invoke(this.currentCarComponents.);
}
/// <summary>
/// 切换不同的部件
/// </summary>
/// <param name="carComponentConfigIndex"></param>
[Button]
public void SwitchComponentConfig(int carComponentConfigIndex)
{
@ -165,6 +171,7 @@ public class Main : MonoBehaviour
// 更新选择的部件名
ComponentConfig componentConfig = currentCarComponents.[componentIndex];
OnCarComponentHighlight.Invoke(componentConfig.);
OnSwitchComponent?.Invoke(componentConfig, componentIndex);
}
private void SetCurrentCarConfigDisplay(int componentIndex, bool isDisplay)

View File

@ -0,0 +1,47 @@
using System.Collections;
using TMPro;
using UnityEngine;
using YogiGameCore.Utils.MonoExtent;
[RequireComponent(typeof(TextMeshProUGUI))]
public class TMPTypewriter : MonoBehaviour
{
private TextMeshProUGUI _text;
public float animTotalTime = 1;
private void Awake()
{
_text = GetComponent<TextMeshProUGUI>();
}
[Button]
public void PlayAnimation(string display)
{
StopAllCoroutines();
_text.text = display;
StartCoroutine(TypeWriteCoroutine());
}
private IEnumerator TypeWriteCoroutine()
{
_text.ForceMeshUpdate();
var tmpTextInfo = _text.textInfo;
int total = tmpTextInfo.characterCount;
bool complete = false;
int current = 0;
while (!complete)
{
if (current > total)
{
current = total;
yield return new WaitForSecondsRealtime(0.1f);
complete = true;
}
_text.maxVisibleCharacters = current;
current += 1;
yield return new WaitForSecondsRealtime(animTotalTime / total);
}
yield return null;
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1e94de55d65e21141ac340e779f2bc67

View File

@ -3,9 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Serialization;
using UnityEngine.UI;
using YogiGameCore.ComponentEx;
using YogiGameCore.Utils;
@ -20,6 +17,41 @@ public class GamePanel : MonoBehaviour
[SerializeField] private SearchView searchView;
[SerializeField] private TMPTypewriter typewriterPrefab;
[SerializeField] private Transform componentTextParent;
private Dictionary<string, TMPTypewriter> spawnedTypewriters;
/// <summary>
/// 当前车的当前聚焦的 部件类型名
/// </summary>
private string componentConfigName;
private void ClearAllComponentDisplayText()
{
Debug.Log("清空车辆所有文本信息");
componentConfigName = null;
componentTextParent.DestroyChildren();
spawnedTypewriters = new Dictionary<string, TMPTypewriter>();
}
private void OnSwitchComponent(ComponentConfig componentConfig, int componentIndex)
{
Debug.Log("OnSwitchComponent");
if (spawnedTypewriters == null || this.componentConfigName == null)
return;
if (!spawnedTypewriters.TryGetValue(this.componentConfigName, out var typewriter))
{
typewriter = GameObject.Instantiate(typewriterPrefab, componentTextParent);
spawnedTypewriters.Add(this.componentConfigName, typewriter);
}
Debug.Log("Spawn Typewriter");
if (typewriter == null)
return;
typewriter.StopAllCoroutines();
typewriter.PlayAnimation(componentConfig.);
}
public void ResetCurrentComponent()
{
var btns = selectComponentParent.GetComponentsInChildren<UberButton>();
@ -29,8 +61,10 @@ public class GamePanel : MonoBehaviour
private void Awake()
{
ClearAllComponentDisplayText();
this.main.OnCarChanged += OnMainOnOnCarChanged;
this.main.OnCarComponentConfigChanged += OnCarComponentConfigChanged;
this.main.OnSwitchComponent += OnSwitchComponent;
}
private void Start()
@ -59,6 +93,9 @@ public class GamePanel : MonoBehaviour
btn.SetHold(true);
}
}
componentConfigName = config.;
Debug.Log($"车辆聚焦的部件类型改变了:{componentConfigName}");
}
private UberButton SpawnSelectComponentBtn(string componentName, int index)
@ -87,10 +124,13 @@ public class GamePanel : MonoBehaviour
if (!v)
return;
main.SwitchComponentConfig(index1);
main.SwitchComponent(0);
});
if (main.GetCurrentCarComponentConfigIndex == index1)
btn.SetHold(true);
}
ClearAllComponentDisplayText();
}
private UberButton SpawnSelectComponentConfigBtn(string displayText, Action<bool> clickAction)

File diff suppressed because one or more lines are too long