using System; using System.Collections; using System.Collections.Generic; using DG.Tweening; using UnityEngine; using UnityEngine.Serialization; namespace Ichni.UI { public class StartUIPage : UIPageBase { public AudioContainer audioContainer; //public List logoParticles; public ParticleSystem floatingParticles; public GameObject peWarningWindow; public GameObject contentWindow; protected override void Awake() { base.Awake(); audioContainer = GetComponent(); } private void Start() { Sequence peWarningSequence = DOTween.Sequence(); peWarningSequence.Append(peWarningWindow.GetComponent().DOFade(1f, 0.5f)); peWarningSequence.AppendInterval(1f); peWarningSequence.Append(peWarningWindow.GetComponent().DOFade(0f, 0.5f).OnStart(() => contentWindow.SetActive(true))); peWarningSequence.AppendCallback(() => { peWarningWindow.SetActive(false); floatingParticles.Play(); }); peWarningSequence.Play(); } public void TouchToStart() { audioContainer.PlaySoundFX("TouchToStart"); FadeOut(); floatingParticles.GetComponent().material.DOColor(Color.clear, "_BaseColor", 0.5f).Play(); ChapterSelectionManager.instance.chapterSelectionUIPage.FadeIn(); } } }