Scriptum/Assets/ContinueButton.cs
2023-01-07 00:39:19 +01:00

34 lines
838 B
C#

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class ContinueButton : MonoBehaviour
{
Color greyscale => new Color(1f, 1f, 1f, 0.3f);
Color greyscaletext => new Color(50f, 50f, 50f, 0.3f);
// Start is called before the first frame update
void Start()
{
GameObject continueButton = GameObject.Find("ContinueButton");
TMP_Text m_TextComponent;
m_TextComponent = GameObject.Find("ContinueText").GetComponent <TextMeshProUGUI>();
if (!PlayerPrefs.HasKey("SceneSaved"))
{
continueButton.GetComponent<Image>().color = greyscaletext;
m_TextComponent.color = greyscaletext;
}
}
// Update is called once per frame
void Update()
{
}
}