Skip to content

Commit f33d082

Browse files
committed
[修改]1. 修改注释
1 parent 652263f commit f33d082

File tree

7 files changed

+283
-99
lines changed

7 files changed

+283
-99
lines changed

Runtime/Interface/ISoundManager.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ public interface ISoundManager
3232
/// </summary>
3333
event EventHandler<PlaySoundFailureEventArgs> PlaySoundFailure;
3434

35-
/*/// <summary>
36-
/// 播放声音更新事件。
37-
/// </summary>
38-
event EventHandler<PlaySoundUpdateEventArgs> PlaySoundUpdate;*/
39-
4035
/// <summary>
4136
/// 设置资源管理器。
4237
/// </summary>

Runtime/Sound/PlaySoundInfo.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,39 @@
1010

1111
namespace GameFrameX.Sound.Runtime
1212
{
13+
/// <summary>
14+
/// 播放声音信息。
15+
/// </summary>
1316
internal sealed class PlaySoundInfo : IReference
1417
{
18+
/// <summary>
19+
/// 绑定的实体。
20+
/// </summary>
1521
private Entity.Runtime.Entity m_BindingEntity;
22+
23+
/// <summary>
24+
/// 声音在世界空间中的位置。
25+
/// </summary>
1626
private Vector3 m_WorldPosition;
27+
28+
/// <summary>
29+
/// 用户自定义数据。
30+
/// </summary>
1731
private object m_UserData;
1832

33+
/// <summary>
34+
/// 初始化播放声音信息的新实例。
35+
/// </summary>
1936
public PlaySoundInfo()
2037
{
2138
m_BindingEntity = null;
2239
m_WorldPosition = Vector3.zero;
2340
m_UserData = null;
2441
}
2542

43+
/// <summary>
44+
/// 获取绑定的实体。
45+
/// </summary>
2646
public Entity.Runtime.Entity BindingEntity
2747
{
2848
get
@@ -31,6 +51,9 @@ public Entity.Runtime.Entity BindingEntity
3151
}
3252
}
3353

54+
/// <summary>
55+
/// 获取声音在世界空间中的位置。
56+
/// </summary>
3457
public Vector3 WorldPosition
3558
{
3659
get
@@ -39,6 +62,9 @@ public Vector3 WorldPosition
3962
}
4063
}
4164

65+
/// <summary>
66+
/// 获取用户自定义数据。
67+
/// </summary>
4268
public object UserData
4369
{
4470
get
@@ -47,6 +73,13 @@ public object UserData
4773
}
4874
}
4975

76+
/// <summary>
77+
/// 创建播放声音信息。
78+
/// </summary>
79+
/// <param name="bindingEntity">绑定的实体。</param>
80+
/// <param name="worldPosition">声音在世界空间中的位置。</param>
81+
/// <param name="userData">用户自定义数据。</param>
82+
/// <returns>创建的播放声音信息。</returns>
5083
public static PlaySoundInfo Create(Entity.Runtime.Entity bindingEntity, Vector3 worldPosition, object userData)
5184
{
5285
PlaySoundInfo playSoundInfo = ReferencePool.Acquire<PlaySoundInfo>();
@@ -56,6 +89,9 @@ public static PlaySoundInfo Create(Entity.Runtime.Entity bindingEntity, Vector3
5689
return playSoundInfo;
5790
}
5891

92+
/// <summary>
93+
/// 清理播放声音信息。
94+
/// </summary>
5995
public void Clear()
6096
{
6197
m_BindingEntity = null;

Runtime/Sound/Sound/Constant.cs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,64 @@ namespace GameFrameX.Sound.Runtime
1212
/// </summary>
1313
internal static class Constant
1414
{
15+
/// <summary>
16+
/// 默认播放位置。
17+
/// </summary>
1518
internal const float DefaultTime = 0f;
19+
20+
/// <summary>
21+
/// 默认是否静音。
22+
/// </summary>
1623
internal const bool DefaultMute = false;
24+
25+
/// <summary>
26+
/// 默认是否循环播放。
27+
/// </summary>
1728
internal const bool DefaultLoop = false;
29+
30+
/// <summary>
31+
/// 默认优先级。
32+
/// </summary>
1833
internal const int DefaultPriority = 0;
34+
35+
/// <summary>
36+
/// 默认音量。
37+
/// </summary>
1938
internal const float DefaultVolume = 1f;
39+
40+
/// <summary>
41+
/// 默认声音淡入时间,以秒为单位。
42+
/// </summary>
2043
internal const float DefaultFadeInSeconds = 0f;
44+
45+
/// <summary>
46+
/// 默认声音淡出时间,以秒为单位。
47+
/// </summary>
2148
internal const float DefaultFadeOutSeconds = 0f;
49+
50+
/// <summary>
51+
/// 默认声音音调。
52+
/// </summary>
2253
internal const float DefaultPitch = 1f;
54+
55+
/// <summary>
56+
/// 默认声音立体声声相。
57+
/// </summary>
2358
internal const float DefaultPanStereo = 0f;
59+
60+
/// <summary>
61+
/// 默认声音空间混合量。
62+
/// </summary>
2463
internal const float DefaultSpatialBlend = 0f;
64+
65+
/// <summary>
66+
/// 默认声音最大距离。
67+
/// </summary>
2568
internal const float DefaultMaxDistance = 100f;
69+
70+
/// <summary>
71+
/// 默认声音多普勒等级。
72+
/// </summary>
2673
internal const float DefaultDopplerLevel = 1f;
2774
}
2875
}

0 commit comments

Comments
 (0)