From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/XPlaySoundArgs.cs | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XPlaySoundArgs.cs (limited to 'Client/Assets/Scripts/XMainClient/XPlaySoundArgs.cs') 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.Recycle(this); + } + } +} -- cgit v1.1-26-g67d0