using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class exit : MonoBehaviour { public bool closed = false; public void CloseTutorial() { if (closed == false) { GetComponent().SetTrigger("close"); closed = true; } } public Image imgBG; public Text btnTxt; // Start is called before the first frame update void Start() { GeneralScript.GroupColors groupColor = GeneralScript.instance.colorsGroups[Random.Range(0, GeneralScript.instance.colorsGroups.Count)]; imgBG.color = groupColor.clara; btnTxt.color = groupColor.clara; } // Update is called once per frame public void exitTutorial() { Destroy(gameObject); } }