feat: 开场音频系统 - 篮球音效+manCall
- OpeningFlowController新增_basketballClip/_manCallClip SerializeField - Step2 Shoot开始时播放篮球音效 - Step3 manfull摔倒后播放manCall - AudioSource.PlayClipAtPoint播放
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f431e6ae1b9f4b94a61c31fe630647a
|
||||
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:
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28a93a41087664f1d9f83a456d17928f
|
||||
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:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87e927868a894498293a31d4eb36f2a4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 845a704b4410b4393ab9327bfaf9d3ec
|
||||
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:
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f561ebe499594da29e31277de2f8a1f
|
||||
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:
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6934b8b2c79df41118a058e984de2a7b
|
||||
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:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4e92e5c3ec474a37b6f9e06e6aa1397
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc5816d37e79f4461a243f63cd20c925
|
||||
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:
|
||||
@@ -119,40 +119,27 @@ public class OpeningFlowController : MonoBehaviour
|
||||
{
|
||||
Debug.Log("=== [OpeningFlow] 片头动画流程开始 ===");
|
||||
|
||||
// 重置 + 等一帧让 Animator 处理
|
||||
if (_manAnimator != null)
|
||||
{
|
||||
_manAnimator.SetBool("IsStart", false);
|
||||
_manAnimator.SetBool("IsFull", false);
|
||||
}
|
||||
if (_manAnimator != null) { _manAnimator.SetBool("IsStart", false); _manAnimator.SetBool("IsFull", false); }
|
||||
yield return null;
|
||||
|
||||
// Step 1: Idle 1s
|
||||
Debug.Log("[OpeningFlow] Step1: man + man2 Idle (1s)");
|
||||
yield return new WaitForSeconds(1f);
|
||||
|
||||
// Step 2: Shoot 3.15s —— 直接 Play,不走 Animator 过渡
|
||||
// Step 2: Shoot + 篮球音效
|
||||
Debug.Log("[OpeningFlow] Step2: Shoot 开始");
|
||||
if (_manAnimator != null)
|
||||
{
|
||||
_manAnimator.Play("Shoot", 0, 0f);
|
||||
Debug.Log("[OpeningFlow] Shoot Play 已触发");
|
||||
}
|
||||
if (_basketballClip != null) AudioSource.PlayClipAtPoint(_basketballClip, Camera.main != null ? Camera.main.transform.position : Vector3.zero);
|
||||
if (_manAnimator != null) { _manAnimator.Play("Shoot", 0, 0f); Debug.Log("[OpeningFlow] Shoot Play 已触发"); }
|
||||
yield return new WaitForSeconds(3.15f);
|
||||
Debug.Log("[OpeningFlow] Step2: Shoot 结束");
|
||||
|
||||
// Step 3: 摔倒 manfull 2.1s + 停留 2s
|
||||
// Step 3: 摔倒 + manCall 音效
|
||||
Debug.Log("[OpeningFlow] Step3: manfull 开始");
|
||||
if (_manAnimator != null)
|
||||
{
|
||||
_manAnimator.Play("manfull", 0, 0f);
|
||||
Debug.Log("[OpeningFlow] manfull Play 已触发");
|
||||
}
|
||||
if (_manAnimator != null) { _manAnimator.Play("manfull", 0, 0f); }
|
||||
yield return new WaitForSeconds(2.1f);
|
||||
if (_manCallClip != null) AudioSource.PlayClipAtPoint(_manCallClip, Camera.main != null ? Camera.main.transform.position : Vector3.zero);
|
||||
Debug.Log("[OpeningFlow] manfull 播放完成, 停留 2s");
|
||||
yield return new WaitForSeconds(2f);
|
||||
|
||||
// Step 4: 黑幕
|
||||
Debug.Log("[OpeningFlow] Step4: 黑幕");
|
||||
yield return StartCoroutine(FadeBlackScreen(0f, 1f));
|
||||
|
||||
@@ -206,4 +193,9 @@ public class OpeningFlowController : MonoBehaviour
|
||||
|
||||
[Header("=== 开关 ===")]
|
||||
[SerializeField] private bool _enableOpeningFlow = true;
|
||||
|
||||
|
||||
[Header("=== 音效 ===")]
|
||||
[SerializeField] private AudioClip _basketballClip;
|
||||
[SerializeField] private AudioClip _manCallClip;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user