2022-10-23 15:56:31 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class LevelUpPopUp : MonoBehaviour
|
|
|
|
{
|
|
|
|
public int lvlup;
|
|
|
|
public GameObject lvlUpPopUpPanel;
|
2022-12-31 12:31:06 +01:00
|
|
|
public GameObject border;
|
|
|
|
public GameObject border1;
|
2022-10-23 15:56:31 +02:00
|
|
|
|
|
|
|
void Update()
|
|
|
|
{
|
|
|
|
lvlup = PlayerPrefs.GetInt("LvlUpPopUp");
|
|
|
|
if (lvlup == 1)
|
|
|
|
{
|
|
|
|
StartCoroutine(LvlUpTimer());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
IEnumerator LvlUpTimer()
|
|
|
|
{
|
|
|
|
lvlUpPopUpPanel.SetActive(true);
|
2022-12-31 12:31:06 +01:00
|
|
|
border.SetActive(true);
|
|
|
|
border1.SetActive(true);
|
2022-10-23 15:56:31 +02:00
|
|
|
PlayerPrefs.SetInt("LvlUpPopUp", 0);
|
|
|
|
yield return new WaitForSeconds(5);
|
|
|
|
lvlUpPopUpPanel.SetActive(false);
|
2022-12-31 12:31:06 +01:00
|
|
|
border.SetActive(false);
|
|
|
|
border1.SetActive(false);
|
2022-10-23 15:56:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|