| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, March 06, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | //拍品上架 |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class AuctionShelfWin : Window |
| | | { |
| | | [SerializeField] ItemCell m_ItemCell; |
| | | [SerializeField] Text m_ItemName; |
| | | [SerializeField] Text m_BasePriceText; |
| | | [SerializeField] Text m_BuyoutPriceText; |
| | | [SerializeField] Button m_CloseBtn; |
| | | [SerializeField] Button m_UseBtn;
|
| | | [SerializeField] Button m_Auction;
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_CloseBtn.AddListener(() => { CloseImmediately(); }); |
| | | m_UseBtn.AddListener(OnClickUseBtn); |
| | | m_Auction.AddListener(OnClickAuction); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | GetItemID(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | private void OnClickUseBtn()
|
| | | {
|
| | | CloseImmediately();
|
| | | } |
| | | private void OnClickAuction()
|
| | | {
|
| | | CloseImmediately();
|
| | | } |
| | | private void GetItemID( )
|
| | | {
|
| | | if (auctionHelpModel.AttrData == null) { return; } |
| | | var config = AuctionItemConfig.Get(auctionHelpModel.AttrData.itemId);
|
| | | var itemConfig = ItemConfig.Get(auctionHelpModel.AttrData.itemId);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (config == null || itemConfig == null) { return; }
|
| | | m_BasePriceText.text = config.BasePrice.ToString();
|
| | | m_BuyoutPriceText.text = config.BuyoutPrice.ToString();
|
| | | } |
| | | #endregion |
| | |
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |