diff options
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);
+ }
+ }
+}
|