Browse Source

遗物购买系统

pull/59/head
45 1 year ago
parent
commit
a1ffa565cf
  1. BIN
      ColorlessWorld-2024-4-2/Assets/Audio/游戏音效/24-移动.wav
  2. 23
      ColorlessWorld-2024-4-2/Assets/Audio/游戏音效/24-移动.wav.meta
  3. 615
      ColorlessWorld-2024-4-2/Assets/Prefab/Shop/RelicSaleNode.prefab
  4. 7
      ColorlessWorld-2024-4-2/Assets/Prefab/Shop/RelicSaleNode.prefab.meta
  5. 2
      ColorlessWorld-2024-4-2/Assets/Scenes/SampleScene.unity
  6. 12
      ColorlessWorld-2024-4-2/Assets/Scenes/Shop.unity
  7. 2
      ColorlessWorld-2024-4-2/Assets/Scenes/StartMainScence.unity
  8. 12
      ColorlessWorld-2024-4-2/Assets/Scripts/Audio/AudioManager.cs
  9. 9
      ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BlackSheep.cs
  10. 10
      ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/DarkCloud.cs
  11. 10
      ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Grinfiend.cs
  12. 10
      ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Mushroom.cs
  13. 11
      ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Polymaw.cs
  14. 3
      ColorlessWorld-2024-4-2/Assets/Scripts/FightReward/RewardManager.cs
  15. 11
      ColorlessWorld-2024-4-2/Assets/Scripts/Legacy/LegacyManager.cs
  16. 14
      ColorlessWorld-2024-4-2/Assets/Scripts/Legacy/LegacyNode.cs
  17. 8
      ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs
  18. 24
      ColorlessWorld-2024-4-2/Assets/Scripts/Shop/RelicSaleNode.cs
  19. 11
      ColorlessWorld-2024-4-2/Assets/Scripts/Shop/RelicSaleNode.cs.meta
  20. 32
      ColorlessWorld-2024-4-2/Assets/Scripts/Shop/ShopManager.cs
  21. 2
      ColorlessWorld-2024-4-2/Assets/Scripts/manager/HideUIBarManager.cs

BIN
ColorlessWorld-2024-4-2/Assets/Audio/游戏音效/24-移动.wav

Binary file not shown.

23
ColorlessWorld-2024-4-2/Assets/Audio/游戏音效/24-移动.wav.meta

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 57e1e3f3225346247ad0fff702ad6049
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

615
ColorlessWorld-2024-4-2/Assets/Prefab/Shop/RelicSaleNode.prefab

@ -0,0 +1,615 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &573507595857388019
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4500072105115287345}
- component: {fileID: 1352486699229121070}
- component: {fileID: 1411110865042424686}
m_Layer: 5
m_Name: SaledMark
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &4500072105115287345
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 573507595857388019}
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: 1754794412913327261}
m_Father: {fileID: 1311931387777519489}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1352486699229121070
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 573507595857388019}
m_CullTransparentMesh: 1
--- !u!114 &1411110865042424686
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 573507595857388019}
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!1 &677786468305324792
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5377858281423787652}
- component: {fileID: 1306201403420719095}
- component: {fileID: 4974928924563737900}
m_Layer: 5
m_Name: Price
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5377858281423787652
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677786468305324792}
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: 1630751953305545589}
- {fileID: 1749923533071407435}
m_Father: {fileID: 1311931387777519489}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: -0.0000076293945}
m_SizeDelta: {x: 100, y: 22.692}
m_Pivot: {x: 0.5, y: 0}
--- !u!222 &1306201403420719095
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677786468305324792}
m_CullTransparentMesh: 1
--- !u!114 &4974928924563737900
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677786468305324792}
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: -554174131, guid: ccba4ba23aa0ebf418d47837e22308d3, type: 3}
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!1 &786405778068570842
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1630751953305545589}
- component: {fileID: 3017385226467385683}
- component: {fileID: 8385780962066308128}
m_Layer: 5
m_Name: Coin
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1630751953305545589
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 786405778068570842}
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: 5377858281423787652}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -26.9, y: 0.00025177002}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3017385226467385683
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 786405778068570842}
m_CullTransparentMesh: 1
--- !u!114 &8385780962066308128
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 786405778068570842}
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: 929138803, guid: 1a7831d573767d247b04e259971aac4f, type: 3}
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!1 &912575536458647953
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1311931387777519489}
- component: {fileID: 3362123693157999914}
- component: {fileID: 3517266222871449953}
- component: {fileID: 7711139244418512900}
m_Layer: 5
m_Name: RelicSaleNode
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1311931387777519489
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 912575536458647953}
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: 853934183522472492}
- {fileID: 5377858281423787652}
- {fileID: 4500072105115287345}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 130, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3362123693157999914
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 912575536458647953}
m_CullTransparentMesh: 1
--- !u!114 &3517266222871449953
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 912575536458647953}
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: 0}
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!114 &7711139244418512900
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 912575536458647953}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 226ba98ca75a45042a07d66800dd0774, type: 3}
m_Name:
m_EditorClassIdentifier:
price: 100
priceText: {fileID: 8612077605585508749}
saledMark: {fileID: 573507595857388019}
relicName:
--- !u!1 &3301895396959642324
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1749923533071407435}
- component: {fileID: 3763136612122447070}
- component: {fileID: 5842662544292466376}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1749923533071407435
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3301895396959642324}
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: 5377858281423787652}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 36.1, y: 0.0002593994}
m_SizeDelta: {x: 93.652, y: 27.6601}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3763136612122447070
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3301895396959642324}
m_CullTransparentMesh: 1
--- !u!114 &5842662544292466376
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3301895396959642324}
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: 12800000, guid: 846d2bc064c8faa4a858510d85bd7140, type: 3}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 100
--- !u!1 &4520407740043595493
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1754794412913327261}
- component: {fileID: 4676507321605929726}
- component: {fileID: 8612077605585508749}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1754794412913327261
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4520407740043595493}
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: 4500072105115287345}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4676507321605929726
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4520407740043595493}
m_CullTransparentMesh: 1
--- !u!114 &8612077605585508749
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4520407740043595493}
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: 12800000, guid: 846d2bc064c8faa4a858510d85bd7140, type: 3}
m_FontSize: 45
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 4
m_MaxSize: 50
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u5356\u6389\u4E86"
--- !u!1 &4547862564442214964
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 853934183522472492}
- component: {fileID: 4838161266964251115}
- component: {fileID: 2751101482477415459}
- component: {fileID: 6589884146827135549}
m_Layer: 5
m_Name: RelicIcon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &853934183522472492
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4547862564442214964}
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: 1311931387777519489}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 10.9}
m_SizeDelta: {x: 125, y: 125}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4838161266964251115
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4547862564442214964}
m_CullTransparentMesh: 1
--- !u!114 &2751101482477415459
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4547862564442214964}
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!114 &6589884146827135549
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4547862564442214964}
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: 2751101482477415459}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7711139244418512900}
m_TargetAssemblyTypeName: RelicSaleNode, Assembly-CSharp
m_MethodName: BuyRelic
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2

7
ColorlessWorld-2024-4-2/Assets/Prefab/Shop/RelicSaleNode.prefab.meta

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

2
ColorlessWorld-2024-4-2/Assets/Scenes/SampleScene.unity

@ -17474,7 +17474,9 @@ MonoBehaviour:
- {fileID: 8300000, guid: bad8f72a868ea0f49a08f4839852274a, type: 3} - {fileID: 8300000, guid: bad8f72a868ea0f49a08f4839852274a, type: 3}
upShieldClip: {fileID: 8300000, guid: 05878b36e4cfec048bb24c2927d72ff3, type: 3} upShieldClip: {fileID: 8300000, guid: 05878b36e4cfec048bb24c2927d72ff3, type: 3}
downShieldClip: {fileID: 8300000, guid: 05878b36e4cfec048bb24c2927d72ff3, type: 3} downShieldClip: {fileID: 8300000, guid: 05878b36e4cfec048bb24c2927d72ff3, type: 3}
playerMoveClip: {fileID: 8300000, guid: 57e1e3f3225346247ad0fff702ad6049, type: 3}
enemyHurtClip: {fileID: 8300000, guid: 32d4f8be35b20a0419ac2d6ac36e6a97, type: 3} enemyHurtClip: {fileID: 8300000, guid: 32d4f8be35b20a0419ac2d6ac36e6a97, type: 3}
enemyMoveClip: {fileID: 8300000, guid: 57e1e3f3225346247ad0fff702ad6049, type: 3}
onePageClip: {fileID: 8300000, guid: 8d3ebc252a552e346aafb2b8da7b3717, type: 3} onePageClip: {fileID: 8300000, guid: 8d3ebc252a552e346aafb2b8da7b3717, type: 3}
amountPageClip: {fileID: 8300000, guid: 2f02670f32b7b1949859664e7ddd9667, type: 3} amountPageClip: {fileID: 8300000, guid: 2f02670f32b7b1949859664e7ddd9667, type: 3}
oneDrawClip: {fileID: 8300000, guid: 53bbd3f6b67ce1349be6899419543471, type: 3} oneDrawClip: {fileID: 8300000, guid: 53bbd3f6b67ce1349be6899419543471, type: 3}

12
ColorlessWorld-2024-4-2/Assets/Scenes/Shop.unity

@ -4786,6 +4786,10 @@ MonoBehaviour:
saleCardNode: {fileID: 5262991169384419118, guid: c0b973b5a584bf04a85bc49727fecda7, saleCardNode: {fileID: 5262991169384419118, guid: c0b973b5a584bf04a85bc49727fecda7,
type: 3} type: 3}
cardNoneColorFather: {fileID: 498734651} cardNoneColorFather: {fileID: 498734651}
relicSaleNodePrefab: {fileID: 912575536458647953, guid: 15414a191ef7dbd4a871186aa1d5e63d,
type: 3}
relicSaleFather: {fileID: 866545451}
relicSaleNodesList: []
cardDeck: [] cardDeck: []
playerState: {fileID: 0} playerState: {fileID: 0}
--- !u!1 &378950669 --- !u!1 &378950669
@ -10271,15 +10275,15 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Padding: m_Padding:
m_Left: 35 m_Left: 41
m_Right: 0 m_Right: 0
m_Top: 40 m_Top: 30
m_Bottom: 0 m_Bottom: 0
m_ChildAlignment: 0 m_ChildAlignment: 0
m_StartCorner: 0 m_StartCorner: 0
m_StartAxis: 0 m_StartAxis: 0
m_CellSize: {x: 150, y: 150} m_CellSize: {x: 130, y: 150}
m_Spacing: {x: 45, y: 0} m_Spacing: {x: 6, y: 0}
m_Constraint: 0 m_Constraint: 0
m_ConstraintCount: 2 m_ConstraintCount: 2
--- !u!1 &883897396 --- !u!1 &883897396

2
ColorlessWorld-2024-4-2/Assets/Scenes/StartMainScence.unity

@ -2549,7 +2549,9 @@ MonoBehaviour:
- {fileID: 8300000, guid: bad8f72a868ea0f49a08f4839852274a, type: 3} - {fileID: 8300000, guid: bad8f72a868ea0f49a08f4839852274a, type: 3}
upShieldClip: {fileID: 8300000, guid: 05878b36e4cfec048bb24c2927d72ff3, type: 3} upShieldClip: {fileID: 8300000, guid: 05878b36e4cfec048bb24c2927d72ff3, type: 3}
downShieldClip: {fileID: 8300000, guid: 05878b36e4cfec048bb24c2927d72ff3, type: 3} downShieldClip: {fileID: 8300000, guid: 05878b36e4cfec048bb24c2927d72ff3, type: 3}
playerMoveClip: {fileID: 8300000, guid: 57e1e3f3225346247ad0fff702ad6049, type: 3}
enemyHurtClip: {fileID: 8300000, guid: 32d4f8be35b20a0419ac2d6ac36e6a97, type: 3} enemyHurtClip: {fileID: 8300000, guid: 32d4f8be35b20a0419ac2d6ac36e6a97, type: 3}
enemyMoveClip: {fileID: 8300000, guid: 57e1e3f3225346247ad0fff702ad6049, type: 3}
onePageClip: {fileID: 8300000, guid: 8d3ebc252a552e346aafb2b8da7b3717, type: 3} onePageClip: {fileID: 8300000, guid: 8d3ebc252a552e346aafb2b8da7b3717, type: 3}
amountPageClip: {fileID: 8300000, guid: 2f02670f32b7b1949859664e7ddd9667, type: 3} amountPageClip: {fileID: 8300000, guid: 2f02670f32b7b1949859664e7ddd9667, type: 3}
oneDrawClip: {fileID: 8300000, guid: 53bbd3f6b67ce1349be6899419543471, type: 3} oneDrawClip: {fileID: 8300000, guid: 53bbd3f6b67ce1349be6899419543471, type: 3}

12
ColorlessWorld-2024-4-2/Assets/Scripts/Audio/AudioManager.cs

@ -19,8 +19,10 @@ public class AudioManager : Singleton<AudioManager>
public AudioClip[] AttackClips; public AudioClip[] AttackClips;
public AudioClip upShieldClip; public AudioClip upShieldClip;
public AudioClip downShieldClip; public AudioClip downShieldClip;
public AudioClip playerMoveClip;
[Header("µÐÈËÕ½¶·ÒôƵ")] [Header("µÐÈËÕ½¶·ÒôƵ")]
public AudioClip enemyHurtClip; public AudioClip enemyHurtClip;
public AudioClip enemyMoveClip;
[Header("Êé±¾ÒôƵ")] [Header("Êé±¾ÒôƵ")]
public AudioClip onePageClip; public AudioClip onePageClip;
public AudioClip amountPageClip; public AudioClip amountPageClip;
@ -206,11 +208,21 @@ public class AudioManager : Singleton<AudioManager>
} }
ActionSource.Play(); ActionSource.Play();
} }
public void PlayerMoveVoicePlayer()
{
ActionSource.clip = playerMoveClip;
ActionSource.Play();
}
public void EnemyHurtVoicePlayer() public void EnemyHurtVoicePlayer()
{ {
enemyActionSource.clip = enemyHurtClip; enemyActionSource.clip = enemyHurtClip;
enemyActionSource.Play(); enemyActionSource.Play();
} }
public void EnemyMoveVoicePlayer()
{
enemyActionSource.clip = enemyMoveClip;
enemyActionSource.Play();
}
public IEnumerator WaitShieldVoicePlayer(int value , float time) public IEnumerator WaitShieldVoicePlayer(int value , float time)
{ {
yield return new WaitForSeconds(time); yield return new WaitForSeconds(time);

9
ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/BlackSheep.cs

@ -186,6 +186,8 @@ public class BlackSheep : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
//ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -198,6 +200,8 @@ public class BlackSheep : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
//ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -226,6 +230,7 @@ public class BlackSheep : MonoBehaviour
enemyNode.positionY = disNode.locationY; enemyNode.positionY = disNode.locationY;
disNode.enemyNode = enemyNode; disNode.enemyNode = enemyNode;
transform.SetParent(disNode.CylinderFloor.transform); transform.SetParent(disNode.CylinderFloor.transform);
yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode));
} }
@ -259,6 +264,7 @@ public class BlackSheep : MonoBehaviour
bool move = true; bool move = true;
float time = 0; float time = 0;
Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre);
for (int posIndex = 0; posIndex < linePath.Count; posIndex++) for (int posIndex = 0; posIndex < linePath.Count; posIndex++)
{ {
time = 0; time = 0;
@ -282,6 +288,9 @@ public class BlackSheep : MonoBehaviour
} }
} }
transform.localPosition = new Vector3(0, 0, -0.1468f);
//ÉùÒô
AudioManager.Instance.EnemyMoveVoicePlayer();
//判断腐蚀 //判断腐蚀
enemyNode.CorrodeRealize(endMapUnity); enemyNode.CorrodeRealize(endMapUnity);
//判断流血 //判断流血

10
ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/DarkCloud.cs

@ -193,6 +193,8 @@ public class DarkCloud : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
//ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -205,6 +207,8 @@ public class DarkCloud : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
//ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -233,6 +237,7 @@ public class DarkCloud : MonoBehaviour
enemyNode.positionY = disNode.locationY; enemyNode.positionY = disNode.locationY;
disNode.enemyNode = enemyNode; disNode.enemyNode = enemyNode;
transform.SetParent(disNode.CylinderFloor.transform); transform.SetParent(disNode.CylinderFloor.transform);
yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode));
} }
@ -268,6 +273,7 @@ public class DarkCloud : MonoBehaviour
bool move = true; bool move = true;
float time = 0; float time = 0;
Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre);
for (int posIndex = 0; posIndex < linePath.Count; posIndex++) for (int posIndex = 0; posIndex < linePath.Count; posIndex++)
{ {
time = 0; time = 0;
@ -308,7 +314,9 @@ public class DarkCloud : MonoBehaviour
yield return 0; yield return 0;
}*/ }*/
transform.localPosition = new Vector3(0, 0, -0.1468f);
//ÉùÒô
AudioManager.Instance.EnemyMoveVoicePlayer();
//判断腐蚀 //判断腐蚀
enemyNode.CorrodeRealize(endMapUnity); enemyNode.CorrodeRealize(endMapUnity);
//判断流血 //判断流血

10
ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Grinfiend.cs

@ -214,6 +214,8 @@ public class Grinfiend : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
//ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -226,6 +228,8 @@ public class Grinfiend : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
//ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -254,6 +258,7 @@ public class Grinfiend : MonoBehaviour
enemyNode.positionY = disNode.locationY; enemyNode.positionY = disNode.locationY;
disNode.enemyNode = enemyNode; disNode.enemyNode = enemyNode;
transform.SetParent(disNode.CylinderFloor.transform); transform.SetParent(disNode.CylinderFloor.transform);
yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode));
} }
@ -287,6 +292,7 @@ public class Grinfiend : MonoBehaviour
bool move = true; bool move = true;
float time = 0; float time = 0;
Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre);
for (int posIndex = 0; posIndex < linePath.Count; posIndex++) for (int posIndex = 0; posIndex < linePath.Count; posIndex++)
{ {
time = 0; time = 0;
@ -310,7 +316,9 @@ public class Grinfiend : MonoBehaviour
} }
} }
transform.localPosition = new Vector3(0, 0, -0.1468f);
//ÉùÒô
AudioManager.Instance.EnemyMoveVoicePlayer();
//判断腐蚀 //判断腐蚀
enemyNode.CorrodeRealize(endMapUnity); enemyNode.CorrodeRealize(endMapUnity);
//判断流血 //判断流血

10
ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Mushroom.cs

@ -265,6 +265,8 @@ public class Mushroom : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
//ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -277,6 +279,8 @@ public class Mushroom : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
//ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -305,6 +309,7 @@ public class Mushroom : MonoBehaviour
enemyNode.positionY = disNode.locationY; enemyNode.positionY = disNode.locationY;
disNode.enemyNode = enemyNode; disNode.enemyNode = enemyNode;
transform.SetParent(disNode.CylinderFloor.transform); transform.SetParent(disNode.CylinderFloor.transform);
yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode));
} }
@ -338,6 +343,7 @@ public class Mushroom : MonoBehaviour
bool move = true; bool move = true;
float time = 0; float time = 0;
Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre);
for (int posIndex = 0; posIndex < linePath.Count; posIndex++) for (int posIndex = 0; posIndex < linePath.Count; posIndex++)
{ {
time = 0; time = 0;
@ -361,7 +367,9 @@ public class Mushroom : MonoBehaviour
} }
} }
transform.localPosition = new Vector3(0, 0, -0.1468f);
//ÉùÒô
AudioManager.Instance.EnemyMoveVoicePlayer();
//判断腐蚀 //判断腐蚀
enemyNode.CorrodeRealize(endMapUnity); enemyNode.CorrodeRealize(endMapUnity);
//判断流血 //判断流血

11
ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/Polymaw.cs

@ -89,7 +89,8 @@ public class Polymaw : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
Debug.Log("剩余步数还有"+ enemyNode.pasth.Count); //ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -102,6 +103,8 @@ public class Polymaw : MonoBehaviour
{ {
if (enemyNode.pasth.Count > 1) if (enemyNode.pasth.Count > 1)
{ {
//ÉùÒô
// AudioManager.Instance.EnemyMoveVoicePlayer();
yield return StartCoroutine(moveOneStep(enemyNode.pasth[i])); yield return StartCoroutine(moveOneStep(enemyNode.pasth[i]));
} }
} }
@ -130,6 +133,7 @@ public class Polymaw : MonoBehaviour
enemyNode.positionY = disNode.locationY; enemyNode.positionY = disNode.locationY;
disNode.enemyNode = enemyNode; disNode.enemyNode = enemyNode;
transform.SetParent(disNode.CylinderFloor.transform); transform.SetParent(disNode.CylinderFloor.transform);
yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode)); yield return StartCoroutine(SkeletonArcherMoveCoroutine(disNode));
} }
@ -275,6 +279,7 @@ public class Polymaw : MonoBehaviour
bool move = true; bool move = true;
float time = 0; float time = 0;
Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre);
for (int posIndex = 0; posIndex < linePath.Count; posIndex++) for (int posIndex = 0; posIndex < linePath.Count; posIndex++)
{ {
time = 0; time = 0;
@ -298,7 +303,9 @@ public class Polymaw : MonoBehaviour
} }
} }
transform.localPosition = new Vector3(0, 0, -0.1468f);
//ÉùÒô
AudioManager.Instance.EnemyMoveVoicePlayer();
//判断腐蚀 //判断腐蚀
enemyNode.CorrodeRealize(endMapUnity); enemyNode.CorrodeRealize(endMapUnity);
//判断流血 //判断流血

3
ColorlessWorld-2024-4-2/Assets/Scripts/FightReward/RewardManager.cs

@ -57,7 +57,8 @@ public class RewardManager : Singleton<RewardManager>
if (EnemyManager.Instance.enemySpeedSortingList.Count <= 1) if (EnemyManager.Instance.enemySpeedSortingList.Count <= 1)
{ {
rewardPanle.SetActive(true); rewardPanle.SetActive(true);
//关闭战斗场内UI
HideUIBarManager.Instance.HideUIBar();
//销毁手卡 //销毁手卡
PlayerStatsManager.Instance.DeleteHandCard(); PlayerStatsManager.Instance.DeleteHandCard();
} }

11
ColorlessWorld-2024-4-2/Assets/Scripts/Legacy/LegacyManager.cs

@ -63,6 +63,17 @@ public class LegacyManager : Singleton <LegacyManager>
} }
public GameObject ShowRelicAsSale(GameObject relicSalePrefab , string className,Transform relicFather)
{
var lefacyObject = Instantiate(relicSalePrefab, relicFather.transform);
Type t = Type.GetType(className);
MonoBehaviour legacyClass = lefacyObject.AddComponent(t) as MonoBehaviour;
object[] parameters = new object[] { className, false };
MethodInfo method = t.GetMethod("CreateSaledRelic");
method.Invoke(legacyClass, parameters);
return lefacyObject;
}
public void ReadRelicExcel(string fileName) public void ReadRelicExcel(string fileName)
{ {
string filePath = Path.Combine(Application.streamingAssetsPath, fileName); string filePath = Path.Combine(Application.streamingAssetsPath, fileName);

14
ColorlessWorld-2024-4-2/Assets/Scripts/Legacy/LegacyNode.cs

@ -25,6 +25,20 @@ public class LegacyNode : MonoBehaviour
OnGet(); OnGet();
} }
}
public virtual void CreateSaledRelic(string className, bool isOnGet)
{
LegacyManager.Instance.legacyNodesList.Add(this);
List<string> relicData = LegacyManager.Instance.relicsDictionary[className];
name = relicData[3];
className = relicData[1];
image = ToolDontDestory.Instance.LoadImage(relicData[2]);
transform.GetChild(0).GetComponent<Image>().sprite = image;
if (isOnGet)
{
OnGet();
}
} }
//获得的一次性效果 //获得的一次性效果
public virtual void OnGet() public virtual void OnGet()

8
ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs

@ -116,6 +116,8 @@ public class Player : MonoBehaviour
FlipLocalScale(raycastHit.point); FlipLocalScale(raycastHit.point);
//改变动画 //改变动画
anim.SetBool("move", true); anim.SetBool("move", true);
//ÉùÒô
// AudioManager.Instance.PlayerMoveVoicePlayer();
if (GameManager.Instance.playerOn != null ) if (GameManager.Instance.playerOn != null )
{ {
@ -144,6 +146,7 @@ public class Player : MonoBehaviour
bool move = true; bool move = true;
float time = 0; float time = 0;
Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre); Debug.Log("开始" + startPos + "结束" + endpos + "中间" + jumpCentre);
for (int posIndex = 0;posIndex < linePath .Count;posIndex++) for (int posIndex = 0;posIndex < linePath .Count;posIndex++)
{ {
time = 0; time = 0;
@ -166,6 +169,11 @@ public class Player : MonoBehaviour
yield return null; yield return null;
} }
if(posIndex ==5)
{
//ÉùÒô
AudioManager.Instance.PlayerMoveVoicePlayer();
}
} }
//判断寄生,流血是否生效 //判断寄生,流血是否生效

24
ColorlessWorld-2024-4-2/Assets/Scripts/Shop/RelicSaleNode.cs

@ -0,0 +1,24 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class RelicSaleNode : MonoBehaviour
{
public int price = 100;
public Text priceText;
public GameObject saledMark;
public string relicName;
public void BuyRelic()
{
if (ShopManager.Instance.playerState.money >= price)
{
ShopManager.Instance.playerState.money -= price;
saledMark.SetActive(true);
}
//ÉùÒô
AudioManager.Instance.BuyVoicePlayer();
}
}

11
ColorlessWorld-2024-4-2/Assets/Scripts/Shop/RelicSaleNode.cs.meta

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 226ba98ca75a45042a07d66800dd0774
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

32
ColorlessWorld-2024-4-2/Assets/Scripts/Shop/ShopManager.cs

@ -1,5 +1,6 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using UnityEngine; using UnityEngine;
using UnityEngine.Playables; using UnityEngine.Playables;
using UnityEngine.UI; using UnityEngine.UI;
@ -33,7 +34,10 @@ public class ShopManager : Singleton <ShopManager>
public GameObject saleCardNode; public GameObject saleCardNode;
[Header("无色卡售卡界面")] [Header("无色卡售卡界面")]
public Transform cardNoneColorFather; public Transform cardNoneColorFather;
[Header("遗物出售界面")]
public GameObject relicSaleNodePrefab;
public Transform relicSaleFather;
public List<RelicSaleNode> relicSaleNodesList = new List<RelicSaleNode>();
[Header("角色状态数据参数")] [Header("角色状态数据参数")]
public List<string> cardDeck = new List<string>(); public List<string> cardDeck = new List<string>();
public PlayerState_SO playerState; public PlayerState_SO playerState;
@ -44,7 +48,7 @@ public class ShopManager : Singleton <ShopManager>
cardDeck = PlayerStatsManager.Instance.cardDeck.cardDeckList; cardDeck = PlayerStatsManager.Instance.cardDeck.cardDeckList;
SaleCardSetUP(); SaleCardSetUP();
SaleRelicSetUP(GetSaledRelicClassName(4));
} }
private void Update() private void Update()
{ {
@ -140,4 +144,28 @@ public class ShopManager : Singleton <ShopManager>
noneColorCard.transform.SetAsFirstSibling(); noneColorCard.transform.SetAsFirstSibling();
noneColorCardNode.GetComponent<CardSaleNode>().cardID = noneColorCardId.ToString(); noneColorCardNode.GetComponent<CardSaleNode>().cardID = noneColorCardId.ToString();
} }
//组装售遗物列表
public List <string> GetSaledRelicClassName(int relicCount)
{
List<string> relicClassName = new List<string>();
List <string > relicsDictionary = LegacyManager.Instance.relicsDictionary.Keys.ToList();
for (int i = 0; i <relicCount; i++)
{
relicClassName.Add(relicsDictionary[Random.Range(0, relicsDictionary.Count)]);
}
return relicClassName;
}
public void SaleRelicSetUP( List <string> relicClassName )
{
relicSaleNodesList.Clear();
for (int i = 0; i < relicClassName.Count; i++)
{
var relic = LegacyManager.Instance.ShowRelicAsSale(relicSaleNodePrefab, relicClassName[i],relicSaleFather);
RelicSaleNode relicSaleNode = relic.GetComponent<RelicSaleNode>();
relicSaleNodesList.Add(relicSaleNode);
}
}
} }

2
ColorlessWorld-2024-4-2/Assets/Scripts/manager/HideUIBarManager.cs

@ -8,10 +8,8 @@ public class HideUIBarManager : Singleton <HideUIBarManager>
public List<GameObject> uiList = new List<GameObject>(); public List<GameObject> uiList = new List<GameObject>();
public void HideUIBar() public void HideUIBar()
{ {
Debug.Log("¿ªÊ¼");
foreach (GameObject uiBar in roleUIBarList ) foreach (GameObject uiBar in roleUIBarList )
{ {
Debug.Log("¿ªÊ¼"+uiBar .name );
uiBar.SetActive(false); uiBar.SetActive(false);
} }
} }

Loading…
Cancel
Save