HeavenStudioPlus/Assets/Scripts/LevelEditor/GridGameSelectorGame.cs

30 lines
895 B
C#
Raw Normal View History

2022-01-11 00:17:29 +00:00
using UnityEngine;
using UnityEngine.UI;
namespace RhythmHeavenMania.Editor
{
public class GridGameSelectorGame : MonoBehaviour
{
public GameObject GameTitlePreview;
public GridGameSelector GridGameSelector;
public void OnClick()
{
2022-01-11 02:06:13 +00:00
GridGameSelector.SelectGame(this.gameObject.name, this.transform.GetSiblingIndex());
2022-01-11 00:17:29 +00:00
}
public void OnEnter()
{
GameTitlePreview.GetComponent<Image>().enabled = true;
GameTitlePreview.transform.GetChild(0).GetComponent<TMPro.TMP_Text>().text = this.gameObject.name;
GameTitlePreview.transform.GetChild(0).gameObject.SetActive(true);
}
public void OnExit()
{
GameTitlePreview.GetComponent<Image>().enabled = false;
GameTitlePreview.transform.GetChild(0).gameObject.SetActive(false);
}
}
}