99 lines
2.3 KiB
C#
99 lines
2.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class GameMainPanel : 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.MainGamePanel);
|
|
});
|
|
}
|
|
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|