Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | /// <summary>
|
| | | /// 得到炼丹和铸炼的结果
|
| | | /// </summary>
|
| | | public event Action<MakeType,int> RefreshMakeItemAnswerAct;
|
| | | public void GetMakerResult(H0721_tagMakeItemAnswer answer)
|
| | | {
|
| | | DesignDebug.Log("GetMakerResult" + answer.Result);
|
| | | if (answer.MakeType == (int)MakeType.Def_mitRefine)
|
| | | switch((MakeType)answer.MakeType)
|
| | | {
|
| | | case MakeType.Def_mitRefine:
|
| | | if (answer.Result == 1)
|
| | | {
|
| | | if(makerItemID != 0)
|
| | |
| | | WindowCenter.Instance.Open<MakerDrugFailWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | else if (answer.MakeType == (int)MakeType.Def_mitMWUpLevel)
|
| | | {
|
| | | break;
|
| | | case MakeType.Def_mitMWUpLevel:
|
| | | if (answer.Result == 1)
|
| | | {
|
| | | if (!WindowCenter.Instance.CheckOpen<TreasureRefineSuccessWin>())
|
| | |
| | | WindowCenter.Instance.Open<TreasureRefineFailWin>();
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | |
|
| | | if(RefreshMakeItemAnswerAct != null)
|
| | | {
|
| | | RefreshMakeItemAnswerAct((MakeType)answer.MakeType,answer.Result);
|
| | | }
|
| | | }
|
| | |
|
| | | #region 灵丹和玄丹的逻辑处理
|
| | |
| | | }
|
| | |
|
| | | Dictionary<int, int> recycleDanDict = new Dictionary<int, int>();
|
| | | List<string> recycleStrlist = new List<string>();
|
| | | public List<string> recycleStrlist = new List<string>();
|
| | | public event Action RefreshSelectRecycleAct;
|
| | | public void AddSelectRecycleDan(ItemModel itemModel)
|
| | | {
|
| | |
| | | BlastFurnaceModel blastFurnace { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } }
|
| | | Dictionary<string, List<ItemModel>> recycleDict;
|
| | | List<string> recycleKeylist;
|
| | | bool isFirstOpen = true;
|
| | | private void OnEnable()
|
| | | {
|
| | | isFirstOpen = true;
|
| | | GlobalTimeEvent.Instance.secondEvent += RefreshResetTime;
|
| | | blastFurnace.RefreshSelectRecycleAct += RefreshRecycleGetMoney;
|
| | | danDrugCtrl.OnRefreshCell += RefreshRecycleDan;
|
| | | shopCtrl.OnRefreshCell += RefreshShopCell;
|
| | | m_storeModel.RefreshBuyShopLimitEvent = CreateShopCell;
|
| | | m_storeModel.RefreshTCBPlayerDataEvent += RefreshRecycleScore;
|
| | | blastFurnace.RefreshMakeItemAnswerAct += OnGetRecycleResult;
|
| | | m_storeModel.storeFuncType = StoreFunc.DanDrugStore;
|
| | | recycleBtn.AddListener(ClickRecycle);
|
| | | playerPack.RefreshItemCountAct += RefreshItemCnt;
|
| | | Init();
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | shopCtrl.OnRefreshCell -= RefreshShopCell;
|
| | | danDrugCtrl.OnRefreshCell -= RefreshRecycleDan;
|
| | | m_storeModel.RefreshTCBPlayerDataEvent -= RefreshRecycleScore;
|
| | | blastFurnace.RefreshSelectRecycleAct -= RefreshRecycleGetMoney;
|
| | | blastFurnace.RefreshMakeItemAnswerAct -= OnGetRecycleResult;
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCnt;
|
| | | recycleBtn.RemoveAllListeners();
|
| | | GlobalTimeEvent.Instance.secondEvent -= RefreshResetTime;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void OnGetRecycleResult(MakeType type, int result)
|
| | | {
|
| | | if (type != MakeType.Def_DanRecycle || result != 1) return;
|
| | |
|
| | | uieffect.Play();
|
| | | }
|
| | |
|
| | | private void RefreshRecycleScore(PlayerDataRefresh refreshType)
|
| | | {
|
| | | if (refreshType != PlayerDataRefresh.CDBPlayerRefresh_Danjing) return;
|
| | |
|
| | | sumMoneyText.text = modelInterface.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(27));
|
| | | if(!isFirstOpen)
|
| | | {
|
| | | uieffect.Play();
|
| | | }
|
| | | isFirstOpen = false;
|
| | | sumMoneyText.text = UIHelper.GetMoneyCnt(27).ToString();
|
| | | }
|
| | |
|
| | | private void RefreshRecycleGetMoney()
|
| | |
| | | {
|
| | | itemCell.gameObject.SetActive(true);
|
| | | ItemModel itemModel = list[0];
|
| | | if (itemModel.itemInfo.IsBind == 1)
|
| | | string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.itemInfo.IsBind);
|
| | | if (blastFurnace.recycleStrlist.Contains(key))
|
| | | {
|
| | | selectImg.SetActive(true);
|
| | | }
|
| | |
| | | switch(config.EquipPlace)
|
| | | {
|
| | | case 0:
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("RealmNeeds", needRealmImgStr.ToString(), curRealmImgStr.ToString()));
|
| | | ConfirmCancel.ShowRealmPopConfirm(Language.Get("Mail101"), Language.Get("RealmNeeds", needRealmImgStr.ToString(), curRealmImgStr.ToString()),Language.Get("PopConfirmWin_Promote"),()=>
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.RealmFunc1);
|
| | | });
|
| | | break;
|
| | | default:
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("KnapS142", needRealmImgStr.ToString(), curRealmImgStr.ToString()));
|
| | |
| | |
|
| | | if (secondTimer > 1f)
|
| | | {
|
| | | secondTimer = 0f;
|
| | | if (isGetNewItem)
|
| | | {
|
| | | secondTimer = 0f;
|
| | | delayTime -= 1;
|
| | | if (delayTime <= 0)
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | DealBagItem();
|
| | | isGetNewItem = true;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoDevour))
|
| | | {
|
| | | if (playerPack.GetCanDevourModellist().Count > 0)
|
| | | List<ItemModel> list = playerPack.GetCanDevourModellist();
|
| | | if (list != null && list.Count > 0)
|
| | | {
|
| | | playerPack.SendEquipdevourQuest();
|
| | | }
|
| | |
| | | public static string popConfirmTitle { get; private set; }
|
| | | public static string popConfirmInfo { get; private set; }
|
| | | public static bool IsSingleConfirm { get; private set; }
|
| | | public static string OKName { get; private set; }
|
| | | public static void ShowPopConfirm(string title, string info, Action<bool> func)
|
| | | {
|
| | | popConfirmTitle = title;
|
| | |
| | | WindowCenter.Instance.Open<PopConfirmWin>();
|
| | | }
|
| | | }
|
| | | |
| | | public static void ShowPopConfirm(string title, string info, Action func = null)
|
| | | {
|
| | | popConfirmTitle = title;
|
| | |
| | | WindowCenter.Instance.Open<PopConfirmWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | public static void ShowRealmPopConfirm(string title, string info,string okName,Action func = null)
|
| | | {
|
| | | popConfirmTitle = title;
|
| | | popConfirmInfo = info;
|
| | | OKName = okName;
|
| | | OnPopConfirmClickEvent = null;
|
| | | OnPopSingleConfirmEvent = func;
|
| | | IsSingleConfirm = true;
|
| | | if (!WindowCenter.Instance.CheckOpen<RealmPopConfirmWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmPopConfirmWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | #region 带toggle的确认取消
|
| | | public static string generalTitle;
|
| | | public static string generalContent;
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, November 29, 2017 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class RealmPopConfirmWin : Window |
| | | { |
| | | [SerializeField] Button popConfirmBtn; |
| | | [SerializeField] Button popCancelBtn; |
| | | [SerializeField] RichText popConfirmInfo; |
| | | [SerializeField] Text popConfirmTitle; |
| | | [SerializeField] Text confirmText; |
| | | [SerializeField] Button closeBtn; |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | popConfirmBtn.onClick.AddListener(OnPopConfirmOkBtn); |
| | | popCancelBtn.onClick.AddListener(OnPopConfirmCancelBtn); |
| | | closeBtn.onClick.AddListener(CloseClick); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | popCancelBtn.gameObject.SetActive(!ConfirmCancel.IsSingleConfirm); |
| | | |
| | | popConfirmTitle.text = ConfirmCancel.popConfirmTitle; |
| | | popConfirmInfo.text = ConfirmCancel.popConfirmInfo; |
| | | confirmText.text = ConfirmCancel.OKName; |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | void OnPopConfirmOkBtn() |
| | | { |
| | | CloseClick(); |
| | | if (ConfirmCancel.OnPopConfirmClickEvent != null) |
| | | { |
| | | ConfirmCancel.OnPopConfirmClickEvent(true); |
| | | return; |
| | | } |
| | | if (ConfirmCancel.OnPopSingleConfirmEvent != null) |
| | | { |
| | | ConfirmCancel.OnPopSingleConfirmEvent(); |
| | | } |
| | | } |
| | | |
| | | void OnPopConfirmCancelBtn() |
| | | { |
| | | CloseClick(); |
| | | if (ConfirmCancel.OnPopConfirmClickEvent != null) { |
| | | ConfirmCancel.OnPopConfirmClickEvent(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 24190db543b360c46b7e5f9a56e570b4 |
| | | timeCreated: 1533959173 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | Def_mitEquipDecompose = 17, // 装备分解
|
| | | Def_mitRefine = 18, // 炼丹
|
| | | Def_mitMWUpLevel = 19, //法宝进阶
|
| | | Def_DanRecycle = 20, //丹药回收
|
| | | }
|
| | | /// <summary>
|
| | | /// 金钱类型(虚拟物品)
|