- 引入 UnityGameFramework
- 使用 Luban 替代原来的 UGF 的数据表
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
namespace UnityGameFramework.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认声音辅助器。
|
||||
/// </summary>
|
||||
public class DefaultSoundHelper : SoundHelperBase
|
||||
{
|
||||
private ResourceComponent m_ResourceComponent = null;
|
||||
|
||||
/// <summary>
|
||||
/// 释放声音资源。
|
||||
/// </summary>
|
||||
/// <param name="soundAsset">要释放的声音资源。</param>
|
||||
public override void ReleaseSoundAsset(object soundAsset)
|
||||
{
|
||||
m_ResourceComponent.UnloadAsset(soundAsset);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
m_ResourceComponent = GameEntry.GetComponent<ResourceComponent>();
|
||||
if (m_ResourceComponent == null)
|
||||
{
|
||||
Log.Fatal("Resource component is invalid.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user