17 lines
418 B
C#
17 lines
418 B
C#
using UnityEngine;
|
|
|
|
[RequireComponent(typeof(CanvasGroup))]
|
|
public class PrizeGameImage : MonoBehaviour
|
|
{
|
|
private CanvasGroup _canvasGroup;
|
|
|
|
void Start()
|
|
{
|
|
_canvasGroup = GetComponent<CanvasGroup>();
|
|
|
|
UpdateView();
|
|
SettingsManager.OnSettingsChanged += UpdateView;
|
|
}
|
|
|
|
private void UpdateView() => _canvasGroup.alpha = SettingsManager.GetBool(SettingKey.PRIZING) ? 1 : 0;
|
|
} |