【音频】提交登录界面bgm播放

main
chenyuqi 2025-03-13 14:58:18 +08:00
parent 61d9e656ab
commit 0789d4e90e
12 changed files with 102 additions and 5 deletions

View File

@ -440,6 +440,19 @@ MonoBehaviour:
FilterRuleName: CollectAll
AssetTags:
UserData:
- GroupName: Audio
GroupDesc:
AssetTags:
ActiveRuleName: EnableGroup
Collectors:
- CollectPath: Assets/Audio
CollectorGUID: f87e68e7258ab441e9eae7964e6c9f47
CollectorType: 0
AddressRuleName: AddressByFileName
PackRuleName: PackDirectory
FilterRuleName: CollectAll
AssetTags:
UserData:
- PackageName: RawPackage
PackageDesc:
EnableAddressable: 0
@ -487,8 +500,8 @@ MonoBehaviour:
AssetTags:
ActiveRuleName: EnableGroup
Collectors:
- CollectPath: Assets/Art/AutoGen/PostProcessScenes/Assets_Scenes_Maps_Maps01_Mountainous_Maps01_Mountainous_1
CollectorGUID: ffa52e267ce8d6a45851b69bc6fe04e8
- CollectPath: Assets/_Test/Audio
CollectorGUID: 75b0d58bca322234fa3e6b6d82d8c93a
CollectorType: 0
AddressRuleName: AddressByFileName
PackRuleName: PackDirectory

View File

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

BIN
ProjectNLD/Assets/Audio/BGM/login.mp3 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 4ad26d50677936345bf67374ef410782
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 2
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:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -276,7 +276,13 @@ public class AudioUnityManager: Singlenton<AudioUnityManager>, IStart, IInitable
private string GetFullPath(string key)
{
return @$"Assets/_Test/Audio/mp3/{key}.mp3";
var cfg = TableManager.Instance.Tables.AudioSourceConfig.GetOrDefault(key);
if (cfg == null)
{
DebugUtil.LogError($"音频Key{key}找不到!");
return "";
}
return cfg.Path;
}
//优化SplitGC

View File

@ -427,6 +427,7 @@ public class UI_StartGameInterfaceController : UIWindow
debugLoginWindow = new(FindObj("UI_LoginWindow"), PhoneEdit, PhoneVerifyCodeEdit, OnAgreementAccept, OnPhoneCodeLoginClick, SendPhoneCodeRequest);
releaseLoginWindow = new(FindObj("UI_LoginWindowNew"), PhoneEdit, PhoneVerifyCodeEdit, OnAgreementAccept, OnPhoneCodeLoginClick, SendPhoneCodeRequest);
AudioManager.Instance.PlayAudio("bgm_login", AudioCriManager.EPlayType.Music, null, true);
var Button_AgeTip = GetComponent<Button>("Button_AgeTip");
#region EventManager
@ -659,6 +660,9 @@ public class UI_StartGameInterfaceController : UIWindow
EventManager.Instance.Unregister(EventManager.EventName.LoginOut, OnLogoutComplete);
EventManager.Instance.Unregister<AppleLoginManager.AppleLoginInfo>(EventManager.EventName.AppleVerifySuccess, OnNetVerifyAppleLoginSuccess);
EventManager.Instance.Unregister(EventManager.EventName.AppleLoginStateFail, OnCheckAppleLoginStateFail);
AudioManager.Instance.StopAll();
AudioManager.Instance.ReleaseAllAudios();
//EventManager.Instance.Unregister(EventManager.EventName.NetError, ConnectNetError);
//EventManager.Instance.Unregister(Framework.EventManager.EventName.NetError, OnCancelCurConnect);
}

View File

@ -1,7 +1,7 @@
[
{
"Key": "bgm_999",
"Path": "Assets/Audio/BGM/"
"Key": "bgm_login",
"Path": "Assets/Audio/BGM/login.mp3"
},
{
"Key": "skill_A00006",