NewUI
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class GameMainPanel_Default : UIBase
|
||||
{
|
||||
public Button btn_Close;
|
||||
#region Skill
|
||||
[Header("Skill")]
|
||||
[Header("righ")]
|
||||
//righ
|
||||
public Button btn_HD;
|
||||
public Button btn_WZZD;
|
||||
[Header("bottom")]
|
||||
//bottom
|
||||
public Button btn_BF;
|
||||
public Button btn_SD;
|
||||
public Button btn_BZ;
|
||||
public Button btn_JG;
|
||||
|
||||
public Button btn_WLQH;
|
||||
#endregion
|
||||
[Header("left")]
|
||||
|
||||
public Toggle toggle_GameSpeed1;
|
||||
public Toggle toggle_GameSpeed2;
|
||||
public Toggle toggle_GameSpeed3;
|
||||
public Toggle toggle_GameSpeed4;
|
||||
public Toggle toggle_GameSpeed5;
|
||||
[Header("Player")]
|
||||
public GameMainPanel_PlayerData[] playerDatas = new GameMainPanel_PlayerData[4];
|
||||
[System.Serializable]
|
||||
public class GameMainPanel_PlayerData
|
||||
{
|
||||
public string sitName_Label;
|
||||
public Button btn_TurretLvUp;
|
||||
public Button btn_TurretLvDown;
|
||||
public TextMeshProUGUI text_TurretLvLabel;
|
||||
public TextMeshProUGUI text_GlodCoinCount;
|
||||
public TextMeshProUGUI text_DiamondCount;
|
||||
public TextMeshProUGUI text_VIPLV;
|
||||
public Image img_Title;
|
||||
}
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
toggle_GameSpeed1.onValueChanged.AddListener((a) =>
|
||||
{
|
||||
if (a)
|
||||
{
|
||||
Time.timeScale = 1;
|
||||
}
|
||||
});
|
||||
toggle_GameSpeed2.onValueChanged.AddListener((a) =>
|
||||
{
|
||||
if (a)
|
||||
{
|
||||
Time.timeScale = 2;
|
||||
}
|
||||
});
|
||||
toggle_GameSpeed3.onValueChanged.AddListener((a) =>
|
||||
{
|
||||
if (a)
|
||||
{
|
||||
Time.timeScale = 3;
|
||||
}
|
||||
});
|
||||
toggle_GameSpeed4.onValueChanged.AddListener((a) =>
|
||||
{
|
||||
if (a)
|
||||
{
|
||||
Time.timeScale = 4;
|
||||
}
|
||||
});
|
||||
toggle_GameSpeed5.onValueChanged.AddListener((a) =>
|
||||
{
|
||||
if (a)
|
||||
{
|
||||
Time.timeScale = 5;
|
||||
}
|
||||
});
|
||||
btn_Close.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.ShowAsync(UIPanel.HomeMainPanel);
|
||||
UIManager.Instance.Close(UIPanel.MainGamePanelDefault);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user