37 lines
741 B
C#
37 lines
741 B
C#
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using TMPro;
|
||
using UnityEngine;
|
||
using UnityEngine.UI;
|
||
|
||
/// <summary>
|
||
/// toggleÏà¹ØµÄ״̬¹ÜÀí
|
||
/// </summary>
|
||
public class MyToggleState : MonoBehaviour
|
||
{
|
||
public TextMeshProUGUI myName;
|
||
public TextMeshProUGUI myTime;
|
||
public TextMeshProUGUI myEvent;
|
||
|
||
Toggle t;
|
||
// Start is called before the first frame update
|
||
void Start()
|
||
{
|
||
t=GetComponent<Toggle>();
|
||
}
|
||
|
||
public void OnToggleChange(bool value)
|
||
{
|
||
if (value)
|
||
{
|
||
myName.color = Color.black;
|
||
myTime.color = Color.black;
|
||
}
|
||
else
|
||
{
|
||
myName.color = Color.white;
|
||
myTime.color = Color.white;
|
||
}
|
||
}
|
||
}
|