| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, February 27, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class AuctionHouseWin : Window |
| | | { |
| | | |
| | | #region Built-in |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, February 27, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | |
|
| | | public class AuctionHouseWin : Window
|
| | | {
|
| | |
|
| | | #region Built-in
|
| | | [SerializeField] FunctionButtonGroup m_FuncBtnGroup;
|
| | | [SerializeField] Button m_CloseBtn;
|
| | | [SerializeField] Button m_LeftBtn;
|
| | | [SerializeField] Button m_RightBtn;
|
| | | [SerializeField] FunctionButton m_FullServiceAuctionWin;//全服拍卖 |
| | | [SerializeField] FunctionButton m_FamilyAuctionWin;//仙盟拍卖 |
| | | [SerializeField] FunctionButton m_MyAuction;//我的拍卖 |
| | | [SerializeField] FunctionButton m_MyFocus;//我的关注 |
| | | [SerializeField] Button m_AttentionButton;//我的关注商品 |
| | | [SerializeField] Button m_TransactionRecordButton;//成交记录 |
| | | [SerializeField] Text m_MoneyText; |
| | | protected override void BindController() |
| | | [SerializeField] FunctionButton m_FullServiceAuctionWin;//全服拍卖
|
| | | [SerializeField] FunctionButton m_FamilyAuctionWin;//仙盟拍卖
|
| | | [SerializeField] FunctionButton m_MyAuction;//我的拍卖
|
| | | [SerializeField] FunctionButton m_MyFocus;//我的关注
|
| | | [SerializeField] Button m_AttentionButton;//我的关注商品
|
| | | [SerializeField] Button m_TransactionRecordButton;//成交记录
|
| | | [SerializeField] Text m_MoneyText;
|
| | | protected override void BindController()
|
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAttentionAuctionItem();//查询拍卖行的关注物品 |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | AuctionInquiry.Instance.SendQueryAttentionAuctionItem();//查询拍卖行的关注物品
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_CloseBtn.AddListener(OnClickClose);
|
| | | m_LeftBtn.AddListener(OnClickLeftBtn);
|
| | | m_RightBtn.AddListener(OnClickRight); |
| | | m_FullServiceAuctionWin.AddListener(OnClickFullServiceAuction); |
| | | m_RightBtn.AddListener(OnClickRight);
|
| | | m_FullServiceAuctionWin.AddListener(OnClickFullServiceAuction);
|
| | | m_FamilyAuctionWin.AddListener(OnClickFamilyAuction);
|
| | | m_MyAuction.AddListener(OnClickMyAuction);
|
| | | m_MyFocus.AddListener(OnClickMyFocus); |
| | | m_MyFocus.AddListener(OnClickMyFocus);
|
| | |
|
| | | m_AttentionButton.AddListener(OnClickAttentionButton); |
| | | m_TransactionRecordButton.AddListener(OnClickTransactionRecordButton); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | m_MoneyText.text = UIHelper.GetMoneyCnt(1).ToString(); |
| | | m_AttentionButton.AddListener(OnClickAttentionButton);
|
| | | m_TransactionRecordButton.AddListener(OnClickTransactionRecordButton);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_MoneyText.text = UIHelper.GetMoneyCnt(1).ToString();
|
| | | }
|
| | | protected override void OnActived()
|
| | | {
|
| | | OnClickFullServiceAuction();
|
| | | m_FuncBtnGroup.TriggerByOrder(functionOrder);
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | }
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | PlayerDatas.Instance.playerDataRefreshEvent += Updatefighting;
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | CloseChild();
|
| | | if (!WindowCenter.Instance.IsOpen<MainInterfaceWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | } |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting; |
| | | PlayerDatas.Instance.playerDataRefreshEvent -= Updatefighting;
|
| | | }
|
| | |
|
| | |
|
| | | #endregion |
| | | private void Updatefighting(PlayerDataRefresh info)
|
| | | #endregion
|
| | | private void Updatefighting(PlayerDataType info)
|
| | | {
|
| | | if (info == PlayerDataRefresh.Gold)
|
| | | if (info == PlayerDataType.Gold)
|
| | | {
|
| | | m_MoneyText.text = UIHelper.GetMoneyCnt(1).ToString();
|
| | | }
|
| | | } |
| | | }
|
| | | private void OnClickClose()
|
| | | {
|
| | | CloseImmediately();
|
| | | } |
| | | }
|
| | | private void OnClickLeftBtn()
|
| | | {
|
| | | m_FuncBtnGroup.TriggerLast();
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void OnClickRight()
|
| | | {
|
| | | m_FuncBtnGroup.TriggerNext();
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void OnClickFullServiceAuction()
|
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<FullServiceAuctionWin>(true);
|
| | | functionOrder = m_FullServiceAuctionWin.order;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void OnClickFamilyAuction()
|
| | | {
|
| | | CloseChild();
|
| | |
| | | {
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|