PJ/Assets/scripts/OpenMinigames.cs

27 lines
547 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class OpenMinigames : MonoBehaviour
{
public Button[] Game;
public int GameCoplete;
private void Start()
{
GameCoplete = PlayerPrefs.GetInt("MiniGamesComplete");
for (int i = 0; i < 6; i++)
{
if (i <= GameCoplete)
{
Game[i].interactable = true;
}
else { Game[i].interactable = false; }
}
}
}