DRHPS/code-csharp/en_US/NewMainMenu_Trophys.cs
2025-04-08 11:31:35 +08:00

27 lines
622 B
C#

using System.Collections.Generic;
using UnityEngine;
public class NewMainMenu_Trophys : MonoBehaviour
{
public List<NewMainMenuTrophy> Trophies = new List<NewMainMenuTrophy>();
public static NewMainMenu_Trophys instance;
private void Awake()
{
instance = this;
UpdateTrophys();
}
public void UpdateTrophys()
{
foreach (NewMainMenuTrophy trophy in Trophies)
{
if (PlayerPrefs.GetInt(trophy.PlayerPrefName, 0) != 0)
{
trophy.TrophyObject.SetActive(value: true);
}
}
}
}