1
This commit is contained in:
@@ -3,6 +3,7 @@ using Assets.MyGame.Scripts.Net.WebResponses;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
@@ -44,6 +45,7 @@ public class UIHome_BY_SelectRoomLevelPanel : SubUIBase
|
||||
public Button btn_CloseTiShi;
|
||||
public Button btn_QuXiao;
|
||||
public Button btn_ChongZhi;
|
||||
private Vector3 _tiShiStandardSize;
|
||||
|
||||
/// <summary>检查当前用户是否有手动选座权限</summary>
|
||||
private bool CanSelectRoom()
|
||||
@@ -69,26 +71,46 @@ public class UIHome_BY_SelectRoomLevelPanel : SubUIBase
|
||||
WebSocketManager.Instance.Connect(SocketType.room);
|
||||
|
||||
// 提示窗口:确认/关闭效果一致(关闭提示),充值跳转商城
|
||||
if (tiShi != null) tiShi.SetActive(false);
|
||||
if (tiShi != null)
|
||||
{
|
||||
tiShi.SetActive(false);
|
||||
_tiShiStandardSize = tiShi.transform.GetChild(0).localScale;
|
||||
}
|
||||
if (btn_CloseTiShi != null)
|
||||
btn_CloseTiShi.onClick.AddListener(() => { if (tiShi != null) tiShi.SetActive(false); });
|
||||
btn_CloseTiShi.onClick.AddListener(HideTiShi);
|
||||
if (btn_QuXiao != null)
|
||||
btn_QuXiao.onClick.AddListener(() => { if (tiShi != null) tiShi.SetActive(false); });
|
||||
btn_QuXiao.onClick.AddListener(HideTiShi);
|
||||
if (btn_ChongZhi != null)
|
||||
btn_ChongZhi.onClick.AddListener(() =>
|
||||
{
|
||||
if (tiShi != null) tiShi.SetActive(false);
|
||||
HideTiShi();
|
||||
UIManager.Instance.Get<UIHomeMain>(UIPanel.HomeMainPanel)
|
||||
.subUIManager.ShowAsync(UIPanel.ShopPanel, ShopTab.Diamond);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>显示提示窗口(手动选座需要充值VIP等)</summary>
|
||||
/// <summary>显示提示窗口(弹窗出现动画)</summary>
|
||||
private void ShowTiShi(string msg)
|
||||
{
|
||||
if (tiShi == null) return;
|
||||
if (tmpText_Label != null) tmpText_Label.text = msg;
|
||||
tiShi.SetActive(true);
|
||||
var t = tiShi.transform.GetChild(0);
|
||||
t.localScale = Vector3.zero;
|
||||
t.DOKill();
|
||||
t.DOScale(_tiShiStandardSize, 0.55f).SetEase(Ease.OutElastic, 0.7f, 0.35f);
|
||||
}
|
||||
|
||||
/// <summary>隐藏提示窗口(缩放消失动画)</summary>
|
||||
private void HideTiShi()
|
||||
{
|
||||
if (tiShi == null || !tiShi.activeSelf) return;
|
||||
var t = tiShi.transform.GetChild(0);
|
||||
t.DOKill();
|
||||
t.DOScale(0, 0.3f).SetEase(Ease.InBack).onComplete += () =>
|
||||
{
|
||||
if (tiShi != null) tiShi.SetActive(false);
|
||||
};
|
||||
}
|
||||
public void OnSelectRoom(int leave)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user