Pārlūkot izejas kodu

5/25更新

2025/5/24	优化调整音乐播放游戏2D部分。添加随机生成音符功能,并且可以设置难度。
Jees 1 nedēļu atpakaļ
vecāks
revīzija
c37c333391
60 mainītis faili ar 1260 papildinājumiem un 47 dzēšanām
  1. 8 0
      Assets/Packages/HintsStarsLite.meta
  2. BIN
      Assets/Packages/HintsStarsLite/Approved 1.wav
  3. 30 0
      Assets/Packages/HintsStarsLite/Approved 1.wav.meta
  4. BIN
      Assets/Packages/HintsStarsLite/Ascending Mystery 1.wav
  5. 30 0
      Assets/Packages/HintsStarsLite/Ascending Mystery 1.wav.meta
  6. BIN
      Assets/Packages/HintsStarsLite/Bell Star 2.wav
  7. 30 0
      Assets/Packages/HintsStarsLite/Bell Star 2.wav.meta
  8. BIN
      Assets/Packages/HintsStarsLite/Brightest Star 3.wav
  9. 30 0
      Assets/Packages/HintsStarsLite/Brightest Star 3.wav.meta
  10. BIN
      Assets/Packages/HintsStarsLite/Checkpoint 2.wav
  11. 30 0
      Assets/Packages/HintsStarsLite/Checkpoint 2.wav.meta
  12. BIN
      Assets/Packages/HintsStarsLite/Coin Bag Reward.wav
  13. 30 0
      Assets/Packages/HintsStarsLite/Coin Bag Reward.wav.meta
  14. BIN
      Assets/Packages/HintsStarsLite/Cosmic Reveal.wav
  15. 30 0
      Assets/Packages/HintsStarsLite/Cosmic Reveal.wav.meta
  16. BIN
      Assets/Packages/HintsStarsLite/Discovery 1.wav
  17. 30 0
      Assets/Packages/HintsStarsLite/Discovery 1.wav.meta
  18. BIN
      Assets/Packages/HintsStarsLite/Harp 4.wav
  19. 30 0
      Assets/Packages/HintsStarsLite/Harp 4.wav.meta
  20. BIN
      Assets/Packages/HintsStarsLite/Harp Money 1.wav
  21. 30 0
      Assets/Packages/HintsStarsLite/Harp Money 1.wav.meta
  22. BIN
      Assets/Packages/HintsStarsLite/Magic Score 5.wav
  23. 30 0
      Assets/Packages/HintsStarsLite/Magic Score 5.wav.meta
  24. BIN
      Assets/Packages/HintsStarsLite/Magic Score 8.wav
  25. 30 0
      Assets/Packages/HintsStarsLite/Magic Score 8.wav.meta
  26. BIN
      Assets/Packages/HintsStarsLite/Magic Score 9.wav
  27. 30 0
      Assets/Packages/HintsStarsLite/Magic Score 9.wav.meta
  28. BIN
      Assets/Packages/HintsStarsLite/Marimba 3 Notes Descend.wav
  29. 30 0
      Assets/Packages/HintsStarsLite/Marimba 3 Notes Descend.wav.meta
  30. BIN
      Assets/Packages/HintsStarsLite/Mellow Hint 2.wav
  31. 30 0
      Assets/Packages/HintsStarsLite/Mellow Hint 2.wav.meta
  32. BIN
      Assets/Packages/HintsStarsLite/Mysterious Chapter.wav
  33. 30 0
      Assets/Packages/HintsStarsLite/Mysterious Chapter.wav.meta
  34. BIN
      Assets/Packages/HintsStarsLite/Notified 2.wav
  35. 30 0
      Assets/Packages/HintsStarsLite/Notified 2.wav.meta
  36. BIN
      Assets/Packages/HintsStarsLite/Positive Vibes Coin.wav
  37. 30 0
      Assets/Packages/HintsStarsLite/Positive Vibes Coin.wav.meta
  38. BIN
      Assets/Packages/HintsStarsLite/Retro Star 2.wav
  39. 30 0
      Assets/Packages/HintsStarsLite/Retro Star 2.wav.meta
  40. BIN
      Assets/Packages/HintsStarsLite/Retro Star Descending 3.wav
  41. 30 0
      Assets/Packages/HintsStarsLite/Retro Star Descending 3.wav.meta
  42. BIN
      Assets/Packages/HintsStarsLite/Sci Fi Stinger 4.wav
  43. 30 0
      Assets/Packages/HintsStarsLite/Sci Fi Stinger 4.wav.meta
  44. BIN
      Assets/Packages/HintsStarsLite/Score Point 2.wav
  45. 30 0
      Assets/Packages/HintsStarsLite/Score Point 2.wav.meta
  46. BIN
      Assets/Packages/HintsStarsLite/Shimmery Reward 5.wav
  47. 30 0
      Assets/Packages/HintsStarsLite/Shimmery Reward 5.wav.meta
  48. BIN
      Assets/Packages/HintsStarsLite/Solo Shimmer 2.wav
  49. 30 0
      Assets/Packages/HintsStarsLite/Solo Shimmer 2.wav.meta
  50. BIN
      Assets/Packages/HintsStarsLite/Unlocked Secret.wav
  51. 30 0
      Assets/Packages/HintsStarsLite/Unlocked Secret.wav.meta
  52. 6 8
      Assets/Resources/Shopping/ShoppingController.cs
  53. 330 7
      Assets/Resources/WalkDogs/SoundTrack/track_1.json
  54. 19 2
      Assets/Scenes/WalkDogs.unity
  55. 5 5
      Assets/Scripts/Develop Script/TestSetup.cs
  56. 1 1
      Assets/Scripts/WalkDogs/NoteController.cs
  57. 70 2
      Assets/Scripts/WalkDogs/SoundGame/SoundTrackManager.cs
  58. 36 22
      Assets/Scripts/WalkDogs/SoundGameController.cs
  59. 33 0
      Assets/Scripts/WalkDogs/SoundGameEffectController.cs
  60. 2 0
      Assets/Scripts/WalkDogs/SoundGameEffectController.cs.meta

+ 8 - 0
Assets/Packages/HintsStarsLite.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 50879c81a163e774bae21d3c0d68afd2
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/Packages/HintsStarsLite/Approved 1.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Approved 1.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: d296adf47dd0a514fbd36b5ff7df9f9c
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Approved 1.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Ascending Mystery 1.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Ascending Mystery 1.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: c4ba6436bdf9d134894c132824def13f
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Ascending Mystery 1.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Bell Star 2.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Bell Star 2.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: d6945231be24c7240a281458fc849e1f
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Bell Star 2.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Brightest Star 3.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Brightest Star 3.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 973cbfce50fc9634b8c2729624d4cc4d
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Brightest Star 3.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Checkpoint 2.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Checkpoint 2.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: f64ab1f9953f79344995a101decf9830
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Checkpoint 2.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Coin Bag Reward.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Coin Bag Reward.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 2a71d8e8ea428e0409d3df636b9f0192
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Coin Bag Reward.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Cosmic Reveal.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Cosmic Reveal.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 6996c6a6c942c7d4d9f2fb5ab5163fda
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Cosmic Reveal.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Discovery 1.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Discovery 1.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 67583b1df87740e41b2542fe351fd91d
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Discovery 1.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Harp 4.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Harp 4.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: a1c48dd39207ece46a29b8796640661e
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Harp 4.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Harp Money 1.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Harp Money 1.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: c58a6e6d4ceb56e4882a7d60561a7afc
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Harp Money 1.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Magic Score 5.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Magic Score 5.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 668620113e9d6dc4483ba3d8dbae9fcf
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Magic Score 5.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Magic Score 8.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Magic Score 8.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: b7b21f9a60172844dbf194c6b25f40dd
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Magic Score 8.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Magic Score 9.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Magic Score 9.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 46e7fc2590c4ae64fb8c79606698b98d
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Magic Score 9.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Marimba 3 Notes Descend.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Marimba 3 Notes Descend.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: bf0938dc5667ff34aa2616789bb48a17
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Marimba 3 Notes Descend.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Mellow Hint 2.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Mellow Hint 2.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 2999a8c2c936b614989c3aa5265eac71
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Mellow Hint 2.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Mysterious Chapter.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Mysterious Chapter.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 76adc3bada8ddff4bbd042635fed2f7d
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Mysterious Chapter.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Notified 2.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Notified 2.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 568470e29bef88c4aaa027db357be957
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Notified 2.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Positive Vibes Coin.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Positive Vibes Coin.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: b3b1ca576c2899b40befb38abb0775fe
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Positive Vibes Coin.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Retro Star 2.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Retro Star 2.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 1be2fcc16ab0da84f99ba7c633037620
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Retro Star 2.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Retro Star Descending 3.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Retro Star Descending 3.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 16d0788660e724f44ae05e641af1b222
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Retro Star Descending 3.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Sci Fi Stinger 4.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Sci Fi Stinger 4.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 146d4b19f95fe6d40832414952b4ea39
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Sci Fi Stinger 4.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Score Point 2.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Score Point 2.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 28a7e67ca249e874887b4c601e4f5e1b
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Score Point 2.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Shimmery Reward 5.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Shimmery Reward 5.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: 6e7f23ef945c235438595e89d6332d46
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Shimmery Reward 5.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Solo Shimmer 2.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Solo Shimmer 2.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: e7d5139a2d2df3f40b2fd91b5c4a0217
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Solo Shimmer 2.wav
+  uploadId: 690447

BIN
Assets/Packages/HintsStarsLite/Unlocked Secret.wav


+ 30 - 0
Assets/Packages/HintsStarsLite/Unlocked Secret.wav.meta

@@ -0,0 +1,30 @@
+fileFormatVersion: 2
+guid: a65e44e8c694a3a4891eef0db109e331
+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: 
+AssetOrigin:
+  serializedVersion: 1
+  productId: 295538
+  packageName: Hints Stars Points & Rewards Sound Effects - Lite Pack
+  packageVersion: 1.0
+  assetPath: Assets/HintsStarsLite/Unlocked Secret.wav
+  uploadId: 690447

+ 6 - 8
Assets/Resources/Shopping/ShoppingController.cs

@@ -25,7 +25,7 @@ public class ShoppingController : MonoBehaviour
     private Label msgBody;
     private VisualElement msgRoot, msgField;
     private TextField qtyField;
-    int puchaseQty = 1; // 购买数量,默认1个    
+    int purchaseQty = 1; // 购买数量,默认1个    
 
     // 选中的产品
     private string selectedItemId, selectedItemDesc, selectedItemPrice;
@@ -214,7 +214,7 @@ public class ShoppingController : MonoBehaviour
         msgBody.text = description;
         msgRoot.visible = true;
         qtyField.value = "1"; // 重置数量输入框
-        puchaseQty = 1; // 重置购买数量
+        purchaseQty = 1; // 重置购买数量
     }
 
     // 数据读取
@@ -249,12 +249,10 @@ public class ShoppingController : MonoBehaviour
     }
     // msg yes button 点击
     void MsgYesClick()
-    {
-        
-        Debug.Log("msg yes clicked");
+    {     
         msgRoot.visible = false;
         // 检测用户金币是否足够
-        if (UserProperty.coin > int.Parse(selectedItemPrice))
+        if (UserProperty.coin > int.Parse(selectedItemPrice)*purchaseQty)
         {
             PurchaseItemRequest(selectedItemId);
         }
@@ -288,7 +286,7 @@ public class ShoppingController : MonoBehaviour
         WWWForm form = new();
         form.AddField("user_id", UserProperty.userId);
         form.AddField("item_id", itemId);
-        form.AddField("qty", puchaseQty);
+        form.AddField("qty", purchaseQty);
         StartCoroutine(WebController.PostRequest(url, form, callback: PurchaseItemCallback));
     }
 
@@ -334,7 +332,7 @@ public class ShoppingController : MonoBehaviour
                 qtyField.value = "99"; // 如果大于 999,自动修正为 999
             }
             yesButton.SetEnabled(true); // 启用确认按钮
-            puchaseQty = value; // 更新购买数量
+            purchaseQty = value; // 更新购买数量
         }
         else
         {

+ 330 - 7
Assets/Resources/WalkDogs/SoundTrack/track_1.json

@@ -2,7 +2,7 @@
     "name": "track sample",
     "description": "track 1 description",
     "length": 120,
-    "resource": "WalkADog/SoundTrack/track_1",
+    "sound_track": "WalkDogs/SoundTrack/mixkit-a-happy-child-532",
     "speed": 2,
     "action points": [
         {
@@ -10,23 +10,346 @@
             "action": "tap"
         },
         {
-            "time": 5.5,
+            "time": 6,
+            "action": "tap"
+        },
+        {
+            "time": 7,
+            "action": "tap"
+        }
+        ,
+        {
+            "time": 8,
+            "action": "tap"
+        }
+        ,
+        {
+            "time": 9,
+            "action": "tap"
+        }
+        ,
+        {
+            "time": 10,
+            "action": "tap"
+        },
+        {
+            "time": 11,
+            "action": "tap"
+        },
+        {
+            "time": 12,
+            "action": "tap"
+        },
+        {
+            "time": 14,
+            "action": "left"
+        },
+        {
+            "time": 14.5,
+            "action": "tap"
+        },
+        {
+            "time": 15,
             "action": "right"
         },
         {
-            "time": 6,
+            "time": 17,
+            "action": "left"
+        },
+        {
+            "time": 17.5,
+            "action": "tap"
+        },
+        {
+            "time": 18,
+            "action": "right"
+        },
+        {
+            "time": 20,
+            "action": "left"
+        },
+        {
+            "time": 20.5,
+            "action": "tap"
+        },
+        {
+            "time": 21,
+            "action": "right"
+        },
+        {
+            "time": 23,
+            "action": "left"
+        },
+        {
+            "time": 23.5,
+            "action": "tap"
+        },
+        {
+            "time": 24,
+            "action": "right"
+        },
+        {
+            "time": 26,
+            "action": "left"
+        },
+        {
+            "time": 26.5,
+            "action": "tap"
+        },
+        {
+            "time": 27,
             "action": "up"
         },
         {
-            "time": 7,
+            "time": 28,
+            "action": "up"
+        },
+        {
+            "time": 29,
+            "action": "up"
+        },
+        {
+            "time": 31,
+            "action": "up"
+        },
+        {
+            "time": 32,
+            "action": "up"
+        },
+        {
+            "time": 33,
+            "action": "up"
+        },
+        {
+            "time": 35,
+            "action": "up"
+        },
+        {
+            "time": 36,
+            "action": "up"
+        },
+        {
+            "time": 37,
+            "action": "up"
+        },
+        {
+            "time": 39,
+            "action": "up"
+        },
+        {
+            "time": 40,
+            "action": "up"
+        },
+        {
+            "time": 41,
+            "action": "up"
+        },
+        {
+            "time": 42,
+            "action": "left"
+        },
+        {
+            "time": 42.5,
             "action": "down"
         },
         {
-            "time": 7.5,
+            "time": 43,
+            "action": "right"
+        },
+        {
+            "time": 44,
             "action": "left"
-        }, 
+        },
         {
-            "time": 8,
+            "time": 44.5,
+            "action": "down"
+        },
+        {
+            "time": 45,
+            "action": "right"
+        },
+        {
+            "time": 46,
+            "action": "tap"
+        },
+        {
+            "time": 49,
+            "action": "left"
+        },
+        {
+            "time": 49.5,
+            "action": "down"
+        },
+        {
+            "time": 50,
+            "action": "right"
+        },
+        {
+            "time": 53,
+            "action": "tap"
+        },
+        {
+            "time": 56,
+            "action": "tap"
+        },
+        {
+            "time": 60,
+            "action": "down"
+        },
+        {
+            "time": 60.5,
+            "action": "down"
+        },
+        {
+            "time": 61,
+            "action": "down"
+        },
+        {
+            "time": 62,
+            "action": "up"
+        },
+        {
+            "time": 64,
+            "action": "down"
+        },
+        {
+            "time": 64.5,
+            "action": "down"
+        },
+        {
+            "time": 65,
+            "action": "down"
+        },
+        {
+            "time": 66,
+            "action": "up"
+        },
+        {
+            "time": 67,
+            "action": "down"
+        },
+        {
+            "time": 67.5,
+            "action": "down"
+        },
+        {
+            "time": 68,
+            "action": "down"
+        },
+        {
+            "time": 69,
+            "action": "up"
+        },
+        {
+            "time": 70,
+            "action": "down"
+        },
+        {
+            "time": 70.5,
+            "action": "down"
+        },
+        {
+            "time": 71,
+            "action": "down"
+        },
+        {
+            "time": 72,
+            "action": "up"
+        },
+        {
+            "time": 74,
+            "action": "tap"
+        },
+        {
+            "time": 76,
+            "action": "tap"
+        },
+        {
+            "time": 78,
+            "action": "tap"
+        },
+        {
+            "time": 81,
+            "action": "tap"
+        },
+        {
+            "time": 83,
+            "action": "tap"
+        },
+        {
+            "time": 84,
+            "action": "right"
+        },
+        {
+            "time": 89,
+            "action": "tap"
+        },
+        {
+            "time": 92,
+            "action": "down"
+        },
+        {
+            "time": 92.5,
+            "action": "down"
+        },
+        {
+            "time": 93,
+            "action": "down"
+        },
+        {
+            "time": 94,
+            "action": "up"
+        },
+        {
+            "time": 95,
+            "action": "down"
+        },
+        {
+            "time": 95.5,
+            "action": "down"
+        },
+        {
+            "time": 96,
+            "action": "down"
+        },
+        {
+            "time": 97,
+            "action": "up"
+        },
+        {
+            "time": 99,
+            "action": "down"
+        },
+        {
+            "time": 99.5,
+            "action": "down"
+        },
+        {
+            "time": 100,
+            "action": "down"
+        },
+        {
+            "time": 101,
+            "action": "up"
+        },
+        {
+            "time": 103,
+            "action": "down"
+        },
+        {
+            "time": 103.5,
+            "action": "down"
+        },
+        {
+            "time": 104,
+            "action": "down"
+        },
+        {
+            "time": 105,
+            "action": "up"
+        },
+        {
+            "time": 106.5,
             "action": "tap"
         }
     ]

+ 19 - 2
Assets/Scenes/WalkDogs.unity

@@ -561,6 +561,7 @@ GameObject:
   - component: {fileID: 1374855186}
   - component: {fileID: 1374855188}
   - component: {fileID: 1374855189}
+  - component: {fileID: 1374855190}
   m_Layer: 0
   m_Name: 2D Game Controller
   m_TagString: Untagged
@@ -605,8 +606,8 @@ AudioSource:
   m_Enabled: 1
   serializedVersion: 4
   OutputAudioMixerGroup: {fileID: 0}
-  m_audioClip: {fileID: 8300000, guid: b6bf186a001b92f4595bfcd3bf0b6702, type: 3}
-  m_Resource: {fileID: 8300000, guid: b6bf186a001b92f4595bfcd3bf0b6702, type: 3}
+  m_audioClip: {fileID: 0}
+  m_Resource: {fileID: 0}
   m_PlayOnAwake: 1
   m_Volume: 1
   m_Pitch: 1
@@ -738,6 +739,22 @@ MonoBehaviour:
   m_DefaultActionMap: Player
   m_SplitScreenIndex: -1
   m_Camera: {fileID: 0}
+--- !u!114 &1374855190
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1374855185}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: be29ab5d09c5f4148a862791d404c907, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  audioSource: {fileID: 1374855188}
+  soundEffect:
+  - {fileID: 8300000, guid: bf0938dc5667ff34aa2616789bb48a17, type: 3}
+  - {fileID: 8300000, guid: d6945231be24c7240a281458fc849e1f, type: 3}
 --- !u!1 &1449772400
 GameObject:
   m_ObjectHideFlags: 0

+ 5 - 5
Assets/Scripts/Develop Script/TestSetup.cs

@@ -58,11 +58,11 @@ public class TestSetup : MonoBehaviour
     {
         if (SceneManager.GetActiveScene().name == "Login")
         {
-            // PlayerPrefs.SetString("LoginToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiSlRZTlpQOU8iLCJleHAiOjE3NTY1NDUxNzd9.oQgjY_6ZHJVYaYxh2b_LMIkUaCJ9FX8UpxpHOt_yLg8");
-            // DateTime now = DateTime.Now;
-            // DateTime oneHourAgo = now.AddHours(-1);
-            // PlayerPrefs.SetString("LoginTokenTime", oneHourAgo.ToString());
-            // EnviromentSetting.UUID = "abc";
+            PlayerPrefs.SetString("LoginToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiSlRZTlpQOU8iLCJleHAiOjE3NTY1NDUxNzd9.oQgjY_6ZHJVYaYxh2b_LMIkUaCJ9FX8UpxpHOt_yLg8");
+            DateTime now = DateTime.Now;
+            DateTime oneHourAgo = now.AddHours(-1);
+            PlayerPrefs.SetString("LoginTokenTime", oneHourAgo.ToString());
+            EnviromentSetting.UUID = "abc";
 
             // PlayerPrefs.DeleteAll();
             // EnviromentSetting.languageCode = "en";

+ 1 - 1
Assets/Scripts/WalkDogs/NoteController.cs

@@ -62,7 +62,7 @@ public class NoteController : MonoBehaviour
     {
         float positionX = transform.position.x; // 获取音符当前X坐标
         float deltaSize = 1 - (Mathf.Abs(positionX / speed) / hitLeadTime);
-        float size = 0.4f + 0.6f * deltaSize; // 根据时间差计算音符大小
+        float size = 0.2f + 0.8f * deltaSize; // 根据时间差计算音符大小
         return new Vector3(size, size, 1); // 调整音符大小
     }
 

+ 70 - 2
Assets/Scripts/WalkDogs/SoundGame/SoundTrackManager.cs

@@ -6,7 +6,7 @@ using UnityEngine;
 public class SoundTrackManager
 {
     public string name { set; get; }
-    public string resource { set; get; }
+    public string soundTrack { set; get; }
     public string description { set; get; }
     public int speed { set; get; } = 100;
     public int length { set; get; } = 0;
@@ -17,7 +17,7 @@ public class SoundTrackManager
         var data = JsonConvert.DeserializeObject<Dictionary<string, object>>(json);
         speed = int.Parse(data["speed"].ToString());
         name = data["name"].ToString();
-        resource = data["resource"].ToString();
+        soundTrack = data["sound_track"].ToString();
         description = data["description"].ToString();
         length = int.Parse(data["length"].ToString());
 
@@ -28,6 +28,68 @@ public class SoundTrackManager
             soundAction.Add(action);
         }
     }
+
+    // 根据音乐时常随机生成
+    public void GenRandomActions(float actionGap=0.5f)
+    {
+        // 读取音乐,并获取长度
+        AudioClip audioClip = Resources.Load<AudioClip>(soundTrack);
+        float length = audioClip.length;
+        soundAction.Clear();
+
+        float timeGap = actionGap;     // 计算出两个相邻音符时间间距,对应程序难度
+        float time = 4f;
+
+        int combo = 0;      // 连续输入音符
+        while (time < length - 2)
+        {
+            int randomInt = Random.Range(0, 7);
+            if (randomInt < 5)
+            {
+                combo++;
+                time += timeGap;
+                if (randomInt == 0)
+                {
+                    SoundAction action = new(time, "tap");
+                    soundAction.Add(action);
+                }
+                if (randomInt == 1)
+                {
+                    SoundAction action = new(time, "left");
+                    soundAction.Add(action);
+                }
+                if (randomInt == 2)
+                {
+                    SoundAction action = new(time, "right");
+                    soundAction.Add(action);
+                }
+                if (randomInt == 3)
+                {
+                    SoundAction action = new(time, "up");
+                    soundAction.Add(action);
+                }
+                if (randomInt == 4)
+                {
+                    SoundAction action = new(time, "down");
+                    soundAction.Add(action);
+                }
+            }
+            else if (randomInt == 5)
+            {
+                time += timeGap;
+                if (combo > 0)
+                {
+                    combo--;
+                }
+            }
+            else if (randomInt == 6)
+            {
+                time += timeGap * combo / 4;
+            }
+            
+        }
+        Debug.Log("random sound action create successful. Total action #:" + soundAction.Count);
+    }
 }
 
 public class SoundAction
@@ -36,4 +98,10 @@ public class SoundAction
     public string action { set; get; } = "";
     public bool isTapped = false;      // 表示当前这个音乐动作是否被播放过
     public bool isActive = false;     // 表示当前这个音乐动作是否正在场景中激活
+
+    public SoundAction(float time, string action)
+    {
+        this.time = time;
+        this.action = action;
+    }
 }

+ 36 - 22
Assets/Scripts/WalkDogs/SoundGameController.cs

@@ -18,13 +18,7 @@ public class SoundGameController : MonoBehaviour
     float gameStartTime;
     float GameEndTime;
     // 游戏得分统计
-    int score = 0;
-    int combo = 0;
-    int PerfectCount = 0;
-    int GoodCount = 0;
-    int PoorCount = 0;
-    int MissCount = 0;
-    int totalCount = 0;
+    int score, combo, maxCombo, NGCombo, perfectCount, goodCount, poorCount, missCount, totalCount;
 
     // TapOrSwipe 触控检测
     Vector2 pressDownPosition = new Vector2(0, 0);
@@ -39,6 +33,8 @@ public class SoundGameController : MonoBehaviour
         {
             string soundTrackString = soundTrackJson.text;
             soundTrackManager.ImportFromJson(soundTrackString);
+            soundTrackManager.GenRandomActions();
+            // soundTrackManager.speed = 4;
         }
         notePrefabSwipe = Resources.Load<GameObject>("WalkDogs/Note/NoteSwipe");
         notePrefabTap = Resources.Load<GameObject>("WalkDogs/Note/NoteTap");
@@ -55,7 +51,7 @@ public class SoundGameController : MonoBehaviour
     IEnumerator PlaySoundGame()
     {
         // 加载音乐
-        AudioClip audioClip = Resources.Load<AudioClip>(soundTrackManager.resource);
+        AudioClip audioClip = Resources.Load<AudioClip>(soundTrackManager.soundTrack);
         AudioSource audioSource = gameObject.AddComponent<AudioSource>();
         audioSource.clip = audioClip;
         audioSource.Play();
@@ -83,26 +79,36 @@ public class SoundGameController : MonoBehaviour
                 if (note.isActive && !note.isTapped && Time.time > TapTimeDeadline)
                 {
                     note.isTapped = true;
-                    MissCount++;
-                    Debug.Log("Miss!" + Time.time + " Tap time deadline: " + TapTimeDeadline + " total miss:" + MissCount);
+                    missCount++;
+                    NGCombo++;
+                    Debug.Log("Miss!" + Time.time + " Tap time deadline: " + TapTimeDeadline + " total miss:" + missCount);
                     Debug.Log("index of note:" + soundTrackManager.soundAction.IndexOf(note));
                     break;
                 }
             }
 
             // 检测游戏是否结束并统计分数
-            totalCount = PerfectCount + GoodCount + PoorCount + MissCount;
+            totalCount = perfectCount + goodCount + poorCount + missCount;
             if (totalCount == soundTrackManager.soundAction.Count)
             {
                 GameEndTime = Time.time;
                 Debug.Log("Game Over!");
-                Debug.Log($"Perfect: {PerfectCount}, Good: {GoodCount}, Poor: {PoorCount}, Miss: {MissCount}");
+                Debug.Log($"Perfect: {perfectCount}, Good: {goodCount}, Poor: {poorCount}, Miss: {missCount}");
                 Debug.Log($"Total Count: {totalCount}");
                 Debug.Log($"Score: {score}");
                 Debug.Log($"Combo: {combo}");
+                Debug.Log($"Max Combo: {maxCombo}");
                 // 结束游戏
                 break;      // 跳出 while 循环
             }
+
+            // 当NGCombo大于5时,播放音效提示
+            if (NGCombo > 5)
+            {
+                SoundGameEffectController.Instance.PlaySoundEffect(0);
+                NGCombo = 0;
+            }
+
             yield return new WaitForSeconds(0.01f);
         }
         yield return null;
@@ -119,7 +125,7 @@ public class SoundGameController : MonoBehaviour
         {
             note = Instantiate(notePrefabSwipe);
         }
-        note.gameObject.name = noteName;
+        note.gameObject.name = "note_" + noteName;
         NoteController noteController = note.GetComponent<NoteController>();
         noteController.speed = soundTrackManager.speed;
         noteController.hitTime = hitTime;
@@ -206,8 +212,13 @@ public class SoundGameController : MonoBehaviour
                         {
                             score += 100;
                             combo++;
-                            PerfectCount++;
-                            Debug.Log("Perfect!" + Time.time + " total perfect:" + PerfectCount);
+                            if (combo > maxCombo)
+                            {
+                                maxCombo = combo;
+                            }
+                            perfectCount++;
+                            NGCombo = 0;
+                            Debug.Log("Perfect!" + Time.time + " total perfect:" + perfectCount);
                             string noteName = soundTrackManager.soundAction.IndexOf(note).ToString();
                             DestroyNote(noteName);
                         }
@@ -215,8 +226,9 @@ public class SoundGameController : MonoBehaviour
                         {
                             score += 30;
                             combo = 0;
-                            GoodCount++;
-                            Debug.Log("Good!" + Time.time + " total good:" + GoodCount);
+                            goodCount++;
+                            NGCombo = 0;
+                            Debug.Log("Good!" + Time.time + " total good:" + goodCount);
                             string noteName = soundTrackManager.soundAction.IndexOf(note).ToString();
                             DestroyNote(noteName);
                         }
@@ -224,15 +236,17 @@ public class SoundGameController : MonoBehaviour
                         {
                             score += 10;
                             combo = 0;
-                            PoorCount++;
-                            Debug.Log("Poor!" + Time.time + " total poor:" + PoorCount);
+                            poorCount++;
+                            NGCombo++;
+                            Debug.Log("Poor!" + Time.time + " total poor:" + poorCount);
                         }
                     }
                     else
                     {
                         combo = 0;
-                        MissCount++;
-                        Debug.Log("Wrong!" + Time.time + " total miss:" + MissCount);
+                        missCount++;
+                        NGCombo++;
+                        Debug.Log("Wrong!" + Time.time + " total miss:" + missCount);
                     }
                     Debug.Log("index of note:" + soundTrackManager.soundAction.IndexOf(note));
                     break;
@@ -243,7 +257,7 @@ public class SoundGameController : MonoBehaviour
 
     private void DestroyNote(string noteName)
     {
-        GameObject note = GameObject.Find(noteName);
+        GameObject note = GameObject.Find("note_" + noteName);
         if (note != null)
         {
             Destroy(note);

+ 33 - 0
Assets/Scripts/WalkDogs/SoundGameEffectController.cs

@@ -0,0 +1,33 @@
+using UnityEngine;
+
+/* WalkDogs场景,音乐游戏控制音效播放
+* 本代码挂在Player上
+ */
+
+ public class SoundGameEffectController: MonoBehaviour
+{
+    public static SoundGameEffectController Instance;
+    //音效相关
+    public AudioSource audioSource;
+    public AudioClip[] soundEffect;
+
+    void Awake()
+    {
+        // 单例模式,确保只有一个GlobalSoundManager
+        if (Instance == null)
+        {
+            Instance = this;
+            //DontDestroyOnLoad(gameObject);        // 必须关掉否则会导致原场景destroy不能执行
+        }
+        else
+        {
+            Destroy(gameObject);
+        }
+    }
+
+
+    public void PlaySoundEffect(int id)
+    {
+        audioSource.PlayOneShot(soundEffect[id]);
+    }
+}

+ 2 - 0
Assets/Scripts/WalkDogs/SoundGameEffectController.cs.meta

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