why
This commit is contained in:
23
Assets/WorkSpace/LH/LibraryToggle.cs
Normal file
23
Assets/WorkSpace/LH/LibraryToggle.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
public class LibraryToggle : MonoBehaviour
|
||||
{
|
||||
TMP_Text Label;
|
||||
private void Awake()
|
||||
{
|
||||
Label = transform.Find(nameof(Label)).GetComponent<TMP_Text>();
|
||||
}
|
||||
|
||||
public void OnToggle(bool flag)
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
Label.color = new Color(1, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Label.color = new Color(0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/WorkSpace/LH/LibraryToggle.cs.meta
Normal file
2
Assets/WorkSpace/LH/LibraryToggle.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 281208f402c11bd4ab21fbf11875ca7f
|
||||
Reference in New Issue
Block a user