diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/GamingMultiKeysSetting.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/GamingMultiKeysSetting.cs index e8757ec4..20d44709 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/GamingMultiKeysSetting.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/GamingMultiKeysSetting.cs @@ -74,7 +74,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings return false; for (int i = 0; i < list.Count; i++) { - if (list[i].IsKey()) + if (list[i].GetKey()) return true; } return false; @@ -86,7 +86,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings return false; for (int i = 0; i < list.Count; i++) { - if (list[i].IsKeyUp()) + if (list[i].GetKeyUp()) return true; } return false; @@ -98,7 +98,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings return false; for (int i = 0; i < list.Count; i++) { - if (list[i].IsKeyDown()) + if (list[i].GetKeyDown()) return true; } return false; @@ -128,7 +128,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings for (int i = 0; i < AxiInputArr.Length; i++) { - if (AxiInputArr[i].IsKey()) + if (AxiInputArr[i].GetKey()) return true; } return false; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/UMAMEMultiKeysSetting.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/UMAMEMultiKeysSetting.cs index bfc15be3..77323f72 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/UMAMEMultiKeysSetting.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/UMAMEMultiKeysSetting.cs @@ -130,7 +130,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings return false; for (int i = 0; i < list.Count; i++) { - if (list[i].IsKey()) + if (list[i].GetKey()) return true; } return false; @@ -142,7 +142,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings return false; for (int i = 0; i < list.Count; i++) { - if (list[i].IsKeyUp()) + if (list[i].GetKeyUp()) return true; } return false; @@ -155,7 +155,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings return false; for (int i = 0; i < list.Count; i++) { - if (list[i].IsKeyDown()) + if (list[i].GetKeyDown()) return true; } return false; @@ -199,7 +199,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings for (int i = 0; i < AxiInputArr.Length; i++) { - if (AxiInputArr[i].IsKey()) + if (AxiInputArr[i].GetKey()) return true; } return false; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/XMBMultiKeysSetting.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/XMBMultiKeysSetting.cs index 9f9d1afb..6c550639 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/XMBMultiKeysSetting.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput.Settings/XMBMultiKeysSetting.cs @@ -106,7 +106,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings return false; for (int i = 0; i < list.Count; i++) { - if (list[i].IsKey()) + if (list[i].GetKey()) return true; } return false; @@ -118,7 +118,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings return false; for (int i = 0; i < list.Count; i++) { - if (list[i].IsKeyUp()) + if (list[i].GetKeyUp()) return true; } return false; @@ -131,7 +131,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings return false; for (int i = 0; i < list.Count; i++) { - if (list[i].IsKeyDown()) + if (list[i].GetKeyDown()) return true; } return false; @@ -161,7 +161,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings for (int i = 0; i < AxiInputArr.Length; i++) { - if (AxiInputArr[i].IsKey()) + if (AxiInputArr[i].GetKey()) return true; } return false; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput/AxiInputEx.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput/AxiInputEx.cs index d46465e6..3caf9a95 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput/AxiInputEx.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiInput/AxiInputEx.cs @@ -29,7 +29,7 @@ namespace Assets.Script.AppMain.AxiInput return data; } - public static bool IsKeyDown(this AxiInput axiInput) + public static bool GetKeyDown(this AxiInput axiInput) { switch (axiInput.type) { @@ -44,7 +44,7 @@ namespace Assets.Script.AppMain.AxiInput } } - public static bool IsKeyUp(this AxiInput axiInput) + public static bool GetKeyUp(this AxiInput axiInput) { switch (axiInput.type) { @@ -59,7 +59,7 @@ namespace Assets.Script.AppMain.AxiInput } } - public static bool IsKey(this AxiInput axiInput) + public static bool GetKey(this AxiInput axiInput) { switch (axiInput.type) { diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MainMenuController.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MainMenuController.cs index f14300a2..2a5dc0de 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MainMenuController.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MainMenuController.cs @@ -120,7 +120,6 @@ namespace AxibugEmuOnline.Client.UI targetPosition, HoriRollSpd) .SetSpeedBased(); - App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Option); } else { @@ -131,11 +130,13 @@ namespace AxibugEmuOnline.Client.UI protected override void OnCmdSelectItemLeft() { SelectIndex--; + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Option); } protected override void OnCmdSelectItemRight() { SelectIndex++; + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Option); } #if UNITY_EDITOR diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MenuItem.cs index b5958553..2baafe6c 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/MenuItem.cs @@ -108,7 +108,6 @@ namespace AxibugEmuOnline.Client.UI if (m_select) OnSelected(m_progress); }); - App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Cursor); } protected virtual void OnSelected(float progress) { } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs index c208606f..14e572e5 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs @@ -1,4 +1,5 @@ -using DG.Tweening; +using AxibugEmuOnline.Client.ClientCore; +using DG.Tweening; using System; using System.Collections.Generic; using UnityEngine; @@ -303,16 +304,21 @@ namespace AxibugEmuOnline.Client protected override void OnCmdSelectItemDown() { SelectIndex++; + //TODO 已经到底的情况下,不播放音效 + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Option); } protected override void OnCmdSelectItemUp() { SelectIndex--; + //TODO 已经到顶的情况下,不播放音效 + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Option); } protected override void OnCmdBack() { Hide(); + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Cancel); } protected override void OnCmdSelectItemLeft() @@ -341,8 +347,8 @@ namespace AxibugEmuOnline.Client var executer = m_runtimeMenuItems[SelectIndex]; bool cancelHide = false; executer.OnExecute(this, ref cancelHide); - if (!cancelHide) Hide(); - + if (!cancelHide) Hide(); + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Option); return false; } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/SubMenuItemGroup.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/SubMenuItemGroup.cs index 526ad352..69d99528 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/SubMenuItemGroup.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/SubMenuItemGroup.cs @@ -1,4 +1,5 @@ -using AxibugEmuOnline.Client.UI; +using AxibugEmuOnline.Client.ClientCore; +using AxibugEmuOnline.Client.UI; using DG.Tweening; using DG.Tweening.Core; using DG.Tweening.Plugins.Options; @@ -68,8 +69,8 @@ namespace AxibugEmuOnline.Client LaunchUI.Instance.ToDetailMenuLayout(); var item = GetItemUIByIndex(SelectIndex); - item.SetSelectState(false); - + item.SetSelectState(false); + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Option); return true; } @@ -79,19 +80,29 @@ namespace AxibugEmuOnline.Client LaunchUI.Instance.ToMainMenuLayout(); var item = GetItemUIByIndex(SelectIndex); - item.SetSelectState(true); + item.SetSelectState(true); + //TODO 已经关闭三级菜单的情况下 不播放 + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Cancel); } protected override void OnCmdSelectItemUp() { - if (m_enteredItem == null) - SelectIndex--; + if (m_enteredItem == null) + { + SelectIndex--; + //TODO 已经到底的情况下,不播放音效 + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Option); + } } protected override void OnCmdSelectItemDown() { - if (m_enteredItem == null) - SelectIndex++; + if (m_enteredItem == null) + { + SelectIndex++; + //TODO 已经到顶的情况下,不播放音效 + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Option); + } } public virtual void SetSelect(bool select) @@ -119,9 +130,9 @@ namespace AxibugEmuOnline.Client protected override void OnCmdSelectItemLeft() { - base.OnCmdSelectItemLeft(); - + base.OnCmdSelectItemLeft(); OnCmdBack(); + App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Cancel); } protected override void OnSelectMenuChanged() diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/VirtualSubMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/VirtualSubMenuItem.cs index 256a58d1..41d73b50 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/VirtualSubMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/VirtualSubMenuItem.cs @@ -39,8 +39,7 @@ namespace AxibugEmuOnline.Client if (InfoNode != null) InfoNode.alpha = m_progress; Root.localScale = Vector3.one * Mathf.Lerp(UnSelectScale, SelectScale, m_progress); - }); - App.audioMgr.PlaySFX(AudioMgr.E_SFXTYPE.Cursor); + }); } public override bool OnEnterItem()