diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XPlaySoundArgs.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XPlaySoundArgs.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/XPlaySoundArgs.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/XPlaySoundArgs.cs b/Client/Assets/Scripts/XMainClient/XPlaySoundArgs.cs new file mode 100644 index 00000000..a1f1c20c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XPlaySoundArgs.cs @@ -0,0 +1,43 @@ +using System;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class XPlaySoundArgs : XEventArgs
+ {
+ public XPlaySoundArgs.Action SoundAction { get; set; }
+
+ public AudioChannel SoundChannel { get; set; }
+
+ public string EventName { get; set; }
+
+ public XAudioExParam ExParam { get; set; }
+
+ public Vector3 Position = Vector3.zero;
+
+ public enum Action
+ {
+ Play,
+ Pause,
+ Stop
+ }
+
+ public XPlaySoundArgs()
+ {
+ this._eDefine = XEventDefine.XEvent_PlaySound;
+ this.SoundChannel = AudioChannel.Motion;
+ }
+
+ public override void Recycle()
+ {
+ base.Recycle();
+ this.SoundAction = XPlaySoundArgs.Action.Stop;
+ this.SoundChannel = AudioChannel.Motion;
+ this.EventName = null;
+ this.Position = Vector3.zero;
+ this.ExParam = null;
+ XEventPool<XPlaySoundArgs>.Recycle(this);
+ }
+ }
+}
|