163 lines
3.8 KiB
C#
163 lines
3.8 KiB
C#
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using System.Collections;
|
|||
|
using Games.Item;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
public class MarketPlayerSell : UIControllerBase<MarketPlayerSell>
|
|||
|
{
|
|||
|
void Start()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
// Use this for initialization
|
|||
|
void OnEnable ()
|
|||
|
{
|
|||
|
SetInstance(this);
|
|||
|
_BuyPage.SetActive(false);
|
|||
|
InitShopInfo();
|
|||
|
}
|
|||
|
|
|||
|
void OnDisable()
|
|||
|
{
|
|||
|
SetInstance(null);
|
|||
|
}
|
|||
|
|
|||
|
// Update is called once per frame
|
|||
|
void Update ()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#region showPage
|
|||
|
|
|||
|
public GameObject _BuyPage;
|
|||
|
|
|||
|
public MarketPlayerShopOpenTip _PlayerShopOpenTip;
|
|||
|
public MarketPlayerShopSellPage _PlayerShopSellPage;
|
|||
|
public MarketPlayerShopInfo _PlayerShopInfo;
|
|||
|
public MarketPlayerForSellPage _PlayerForSellPage;
|
|||
|
public MarketPlayerOutSellPage _PlayerOutSellPage;
|
|||
|
public MarketPlayerSellLog _PlayerSellLog;
|
|||
|
public MarketMoneyCheckLog _PlayerMoneyCheckLog;
|
|||
|
|
|||
|
public void UpdateShopInfo()
|
|||
|
{
|
|||
|
if (_PlayerShopSellPage.gameObject.activeSelf)
|
|||
|
{
|
|||
|
_PlayerShopSellPage.UpdateShopInfo();
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
ShowSellItems();
|
|||
|
_PlayerShopSellPage.UpdateShopInfo();
|
|||
|
}
|
|||
|
|
|||
|
if (_PlayerShopInfo.gameObject.activeSelf)
|
|||
|
{
|
|||
|
_PlayerShopInfo.InitShopInfo();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void InitShopInfo()
|
|||
|
{
|
|||
|
//if (string.IsNullOrEmpty(Market.ShopName))
|
|||
|
//{
|
|||
|
// ShowOpenTip();
|
|||
|
//}
|
|||
|
//else
|
|||
|
{
|
|||
|
ShowSellItems();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void ShowOpenTip()
|
|||
|
{
|
|||
|
_PlayerShopOpenTip.gameObject.SetActive(true);
|
|||
|
_PlayerShopSellPage.gameObject.SetActive(false);
|
|||
|
_PlayerShopInfo.gameObject.SetActive(false);
|
|||
|
_PlayerForSellPage.gameObject.SetActive(false);
|
|||
|
_PlayerOutSellPage.gameObject.SetActive(false);
|
|||
|
_PlayerSellLog.gameObject.SetActive(false);
|
|||
|
|
|||
|
_PlayerShopOpenTip.InitShopTip();
|
|||
|
}
|
|||
|
|
|||
|
private void ShowSellItems()
|
|||
|
{
|
|||
|
_PlayerShopOpenTip.gameObject.SetActive(false);
|
|||
|
_PlayerShopSellPage.gameObject.SetActive(true);
|
|||
|
_PlayerShopInfo.gameObject.SetActive(false);
|
|||
|
_PlayerForSellPage.gameObject.SetActive(false);
|
|||
|
_PlayerOutSellPage.gameObject.SetActive(false);
|
|||
|
_PlayerSellLog.gameObject.SetActive(false);
|
|||
|
|
|||
|
_PlayerShopSellPage.InitSellItems();
|
|||
|
}
|
|||
|
|
|||
|
public void ShowForSellPage(GameItem sellItem)
|
|||
|
{
|
|||
|
_PlayerForSellPage.gameObject.SetActive(true);
|
|||
|
|
|||
|
_PlayerForSellPage.InitSellItem(sellItem);
|
|||
|
}
|
|||
|
|
|||
|
public void CloseForSellPage()
|
|||
|
{
|
|||
|
_PlayerForSellPage.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
public void ShowOutSellItem(MarketPlayerSellItemInfo outSellItem)
|
|||
|
{
|
|||
|
_PlayerOutSellPage.gameObject.SetActive(true);
|
|||
|
_PlayerOutSellPage.InitOutSellItem(outSellItem);
|
|||
|
}
|
|||
|
|
|||
|
public void CloseOutSellPage()
|
|||
|
{
|
|||
|
_PlayerOutSellPage.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
public void ShowShopInfo()
|
|||
|
{
|
|||
|
_PlayerShopInfo.gameObject.SetActive(true);
|
|||
|
_PlayerShopInfo.InitShopInfo();
|
|||
|
}
|
|||
|
|
|||
|
public void CloseShopInfo()
|
|||
|
{
|
|||
|
_PlayerShopInfo.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
public void ShowShopSellLog()
|
|||
|
{
|
|||
|
_PlayerSellLog.gameObject.SetActive(true);
|
|||
|
_PlayerSellLog.InitSellLog();
|
|||
|
}
|
|||
|
|
|||
|
public void CloseSellLog()
|
|||
|
{
|
|||
|
_PlayerSellLog.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
public void ShowMoneyCheckLog()
|
|||
|
{
|
|||
|
_PlayerMoneyCheckLog.gameObject.SetActive(true);
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateMoneyCheck(GC_RET_USER_SHOP_CHECK_MONEY packet)
|
|||
|
{
|
|||
|
_PlayerMoneyCheckLog.gameObject.SetActive(true);
|
|||
|
_PlayerMoneyCheckLog.InitCheckLog(packet);
|
|||
|
}
|
|||
|
|
|||
|
public void CloseMoneyCheckLog()
|
|||
|
{
|
|||
|
_PlayerMoneyCheckLog.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
}
|