rise-and-swine/Assets/Scripts/Assembly-CSharp/ShowOnce.cs
2023-02-25 23:04:03 -05:00

20 lines
443 B
C#

using UnityEngine;
public class ShowOnce : MonoBehaviour
{
private void Awake()
{
string text = "show_count_" + this.key;
int @int = GameProgress.GetInt(text, 0, GameProgress.Location.Local, null);
if (@int >= this.showTimes)
{
UnityEngine.Object.Destroy(base.gameObject);
return;
}
GameProgress.SetInt(text, @int + 1, GameProgress.Location.Local);
}
public string key = string.Empty;
private int showTimes = 1;
}