2022-06-02 09:49:51 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class ParticleDisable : MonoBehaviour
|
|
|
|
{
|
|
|
|
public int loadedInt;
|
|
|
|
void Update()
|
|
|
|
{
|
2022-06-03 10:34:31 +02:00
|
|
|
loadedInt = PlayerPrefs.GetInt("rock");
|
2022-06-02 09:49:51 +02:00
|
|
|
StartCoroutine(Destroy(loadedInt));
|
|
|
|
}
|
|
|
|
|
|
|
|
IEnumerator Destroy(int loaded)
|
|
|
|
{
|
|
|
|
if (loaded == 0)
|
|
|
|
{
|
|
|
|
yield return new WaitForSeconds(1);
|
|
|
|
Destroy(gameObject);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|