主页与Task任务处理
This commit is contained in:
@@ -37,9 +37,6 @@ namespace TcgEngine.UI
|
||||
|
||||
public List<RankLine> lines = new List<RankLine>();
|
||||
public List<LadderRankLine> ladderLines = new List<LadderRankLine>();
|
||||
|
||||
[Header("返回主页")]
|
||||
public Button returnToHome_button;
|
||||
|
||||
private const string DefaultAvatarId = "bear";
|
||||
|
||||
@@ -59,28 +56,6 @@ namespace TcgEngine.UI
|
||||
my_line.onClick += OnClickLine;
|
||||
my_ladderLine.onClick += OnClickRankLine;
|
||||
InitLines();
|
||||
|
||||
returnToHome_button.onClick.AddListener(OnReturnToHome);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回主页
|
||||
/// </summary>
|
||||
public void OnReturnToHome()
|
||||
{
|
||||
isHideObject = !isHideObject;
|
||||
if (isHideObject)
|
||||
{
|
||||
Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
foreach (var obj in hideGameObject)
|
||||
{
|
||||
obj.SetActive(!isHideObject);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
@@ -257,7 +232,7 @@ namespace TcgEngine.UI
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
|
||||
// private void RankPanelColl()
|
||||
// {
|
||||
// if (isLadderRank)
|
||||
|
||||
29
Assets/TcgEngine/Scripts/Menu/UIFrame.cs
Normal file
29
Assets/TcgEngine/Scripts/Menu/UIFrame.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace TcgEngine.UI
|
||||
{
|
||||
public class UIFrame : UIPanel
|
||||
{
|
||||
public Button uiFrameHideButton;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
Hide();
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
uiFrameHideButton.onClick.AddListener(OnUiFrameHide);
|
||||
}
|
||||
|
||||
private void OnUiFrameHide()
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Menu/UIFrame.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Menu/UIFrame.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9379c33c33779f64a94d441f6a521411
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user