10360 仙匠大会
1.辅助道具二次确认换复选框版本,勾选后本次登陆不再提示
2.修复仙露最大可用数量计算公式
| | |
| | | public int useCol2;
|
| | | public bool isPlayAssistiveItemAnimation;
|
| | |
|
| | | public bool isSkip1 = false;
|
| | | public bool isSkip2 = false;
|
| | | public bool isSkip3 = false;
|
| | | public bool isSkip4 = false;
|
| | |
|
| | | public readonly int MaxItemLv = 11;//最大合成物等级
|
| | | public readonly int MaxGridRows = 4;
|
| | | public readonly int MaxGridCols = 4;
|
| | |
| | | actScore = 0;
|
| | | no1PlayerID = 0;
|
| | | no1PlayerIDCross = 0;
|
| | | isSkip1 = false;
|
| | | isSkip2 = false;
|
| | | isSkip3 = false;
|
| | | isSkip4 = false;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | |
| | | if (!ItemConfig.Has(itemID))
|
| | | return;
|
| | | ItemConfig itemConfig = ItemConfig.Get(itemID);
|
| | |
|
| | | ConfirmCancel.ShowPopConfirmEx(Language.Get("Mail101"), Language.Get("LianQi16", itemInfo.Name, itemConfig.ItemName), OnConfirm1, OnConfirm1);
|
| | | if (model.isSkip1)
|
| | | {
|
| | | model.isUseTool = false;
|
| | | if (model.IsCanSendUseItem())
|
| | | {
|
| | | model.SendUseOP(1, 0, model.useRow1, model.useCol1);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ConfirmCancel.ToggleConfirmCancelEx(Language.Get("Mail101"), Language.Get("LianQi16", itemInfo.Name, itemConfig.ItemName), Language.Get("ConfirmCancel102"), OnConfirm1, OnConfirm1,model.isSkip1);
|
| | | }
|
| | | }
|
| | | else if (model.nowAssistiveItemNum == 2 && model.isStartChoose && model.isChoose1 && model.isChoose2)
|
| | | {
|
| | |
| | | if (!ItemConfig.Has(itemID))
|
| | | return;
|
| | | ItemConfig itemConfig = ItemConfig.Get(itemID);
|
| | |
|
| | | ConfirmCancel.ShowPopConfirmEx(Language.Get("Mail101"), Language.Get("LianQi17", itemConfig.ItemName, itemInfo.Name, itemInfo2.Name), OnConfirm2, OnConfirm2);
|
| | | if (model.isSkip2)
|
| | | {
|
| | | model.isUseTool = false;
|
| | | if (model.IsCanSendUseItem())
|
| | | {
|
| | | model.SendUseOP(1, 1, model.useRow1, model.useCol1, model.useRow2, model.useCol2);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ConfirmCancel.ToggleConfirmCancelEx(Language.Get("Mail101"), Language.Get("LianQi17", itemConfig.ItemName, itemInfo.Name, itemInfo2.Name), Language.Get("ConfirmCancel102"), OnConfirm2, OnConfirm2, model.isSkip2);
|
| | | }
|
| | | }
|
| | | else if (model.nowAssistiveItemNum == 3 & model.isStartChoose && model.isChoose1)
|
| | | {
|
| | |
| | | if (!ItemConfig.Has(itemID))
|
| | | return;
|
| | | ItemConfig itemConfig = ItemConfig.Get(itemID);
|
| | |
|
| | | ConfirmCancel.ShowPopConfirmEx(Language.Get("Mail101"), Language.Get("LianQi16", itemInfo.Name, itemConfig.ItemName), OnConfirm3, OnConfirm3);
|
| | | if (model.isSkip3)
|
| | | {
|
| | | model.isUseTool = false;
|
| | | if (model.IsCanSendUseItem())
|
| | | {
|
| | | model.SendUseOP(1, 2, model.useRow1, model.useCol1);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ConfirmCancel.ToggleConfirmCancelEx(Language.Get("Mail101"), Language.Get("LianQi16", itemInfo.Name, itemConfig.ItemName), Language.Get("ConfirmCancel102"), OnConfirm3, OnConfirm3, model.isSkip3);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnConfirm1(bool _ok)
|
| | | private void OnConfirm1(bool _ok, bool isToggle)
|
| | | {
|
| | | model.isSkip1 = isToggle;
|
| | | model.isUseTool = false;
|
| | | if (_ok && model.IsCanSendUseItem())
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnConfirm2(bool _ok)
|
| | | private void OnConfirm2(bool _ok, bool isToggle)
|
| | | {
|
| | | model.isSkip2 = isToggle;
|
| | | model.isUseTool = false;
|
| | | if (_ok && model.IsCanSendUseItem())
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnConfirm3(bool _ok)
|
| | | private void OnConfirm3(bool _ok, bool isToggle)
|
| | | {
|
| | | model.isSkip3 = isToggle;
|
| | | model.isUseTool = false;
|
| | | if (_ok && model.IsCanSendUseItem())
|
| | | {
|
| | |
| | | LianQiActModel model { get { return ModelCenter.Instance.GetModel<LianQiActModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | int itemID;
|
| | | private void OnConfirm4(bool _ok)
|
| | |
|
| | | private void OnConfirm4(bool _ok, bool isToggle)
|
| | | {
|
| | | model.isSkip4 = isToggle;
|
| | | if (_ok && model.IsCanSendUseItem())
|
| | | {
|
| | | model.SendUseOP((int)splitSlider.value, 3, 0, 0);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | ConfirmCancel.ShowPopConfirmEx(Language.Get("Mail101"), Language.Get("LianQi20", (int)splitSlider.value, itemConfig.ItemName), OnConfirm4, OnConfirm4);
|
| | | if (model.isSkip4)
|
| | | {
|
| | | if (model.IsCanSendUseItem())
|
| | | {
|
| | | model.SendUseOP((int)splitSlider.value, 3, 0, 0);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ConfirmCancel.ToggleConfirmCancelEx(Language.Get("Mail101"), Language.Get("LianQi20", (int)splitSlider.value, itemConfig.ItemName), Language.Get("ConfirmCancel102"), OnConfirm4, OnConfirm4, model.isSkip4);
|
| | | }
|
| | |
|
| | | CloseClick();
|
| | | });
|
| | |
|
| | |
| | | return;
|
| | | int useItemCnt = model.GetUseItemCnt(model.nowPlayerInfo.UseItemCntList, model.nowAssistiveItemNum);
|
| | | int hasCnt = hasCount > limitCnt ? limitCnt : hasCount;
|
| | | int nowResCnt = Mathf.Max(0, limitCnt - useItemCnt); //本轮剩余多少次
|
| | | int realCnt = nowResCnt > hasCnt ? hasCnt : nowResCnt;
|
| | | txtCount.text = Language.Get("LianQi15", Mathf.Max(0, limitCnt - useItemCnt), limitCnt);
|
| | | splitSlider.maxValue = Mathf.Min(Mathf.Max(0, hasCnt - useItemCnt), limitCnt);
|
| | | splitSlider.maxValue = realCnt;
|
| | | splitSlider.minValue = hasCount > 0 ? 1 : 0;
|
| | | splitSlider.value = splitSlider.minValue;
|
| | | txtNumber.text = Mathf.Ceil(splitSlider.value).ToString();
|
| | |
| | | public static bool toggleOpenState { get; private set; }
|
| | | public static Action<bool, bool> OnToggleConfirmEvent;
|
| | | public static Action<bool> OnToggleSingleConfirmEvent;
|
| | |
|
| | | public static Action<bool, bool> OnToggleConfirmEventEx;
|
| | | //带toggle的确认和取消
|
| | | public static void ToggleConfirmCancel(string title, string content, string toggleTxt, Action<bool, bool> func, bool _toggle = false)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | //带toggle的确认和取消 右上角圆形关闭按钮也有回调函数
|
| | | public static void ToggleConfirmCancelEx(string title, string content, string toggleTxt, Action<bool, bool> func, Action<bool, bool> func1, bool _toggle = false)
|
| | | {
|
| | | generalTitle = title;
|
| | | generalContent = content;
|
| | | toggleContent = toggleTxt;
|
| | | OnToggleSingleConfirmEvent = null;
|
| | | OnToggleConfirmEvent = func;
|
| | | OnToggleConfirmEventEx = func1;
|
| | | toggleOpenState = _toggle;
|
| | | OKName = null;
|
| | | CancelName = null;
|
| | | if (!WindowCenter.Instance.IsOpen<ToggleConfirmWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<ToggleConfirmWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | //带toggle的确定和取消按钮,且可以改变按钮文字
|
| | | public static void ToggleConfirmCancel(string title, string content, string toggleTxt, string okName, string cancelName, Action<bool, bool> func, bool _toggle = false)
|
| | | {
|
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace vnxbqy.UI { |
| | | namespace vnxbqy.UI
|
| | | { |
| | | |
| | | public class ToggleConfirmWin : Window |
| | | { |
| | |
| | | { |
| | | m_ConfirmBtn.onClick.AddListener(OnConfirm); |
| | | m_CancelBtn.onClick.AddListener(OnCancel); |
| | | m_CloseBtn.onClick.AddListener(CloseClick); |
| | | m_CloseBtn.onClick.AddListener(OnCancelEx); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | } |
| | | CloseClick(); |
| | | } |
| | | |
| | | private void OnCancelEx() |
| | | { |
| | | if (ConfirmCancel.OnToggleConfirmEventEx != null) |
| | | { |
| | | ConfirmCancel.OnToggleConfirmEventEx(false, m_Toggle.isOn); |
| | | } |
| | | CloseClick(); |
| | | } |
| | | } |
| | | |
| | | } |