28 lines
569 B
C#
28 lines
569 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class LevelUpPopUp : MonoBehaviour
|
|
{
|
|
public int lvlup;
|
|
public GameObject lvlUpPopUpPanel;
|
|
|
|
void Update()
|
|
{
|
|
lvlup = PlayerPrefs.GetInt("LvlUpPopUp");
|
|
if (lvlup == 1)
|
|
{
|
|
StartCoroutine(LvlUpTimer());
|
|
}
|
|
}
|
|
|
|
IEnumerator LvlUpTimer()
|
|
{
|
|
lvlUpPopUpPanel.SetActive(true);
|
|
PlayerPrefs.SetInt("LvlUpPopUp", 0);
|
|
yield return new WaitForSeconds(5);
|
|
lvlUpPopUpPanel.SetActive(false);
|
|
}
|
|
|
|
}
|