ShantiManti/Assets/game/Scripts/UI/LevelCounter.cs
MarcUs7 7fd4e011a2 Refactored SaveSystem & Endlevel, renamed animations
The SaveSystem can now create a save file if it doesn't exist already.
And other changes
2024-10-05 19:53:32 +02:00

26 lines
557 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LevelCounter : MonoBehaviour
{
Animator animator;
void Start()
{
animator = GetComponent<Animator>();
StartCoroutine(Disabeling());
}
IEnumerator Disabeling()
{
yield return new WaitForSeconds(2.0f);
animator.SetBool("Fade", true);
yield return new WaitForSeconds(0.1f);
animator.SetBool("Fade", false);
yield return new WaitForSeconds(1.8f);
Destroy(gameObject);
}
}