summaryrefslogtreecommitdiff
path: root/GameCode/DevelopmentManager.cs
blob: 7caec2518a54a9704c6d878c8ea65f54c2ac8192 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using UnityEngine;

public class DevelopmentManager : MonoBehaviour
{
	[SerializeField]
	private GameObject[] startingDevelopments;

	private float developmentPercent;

	private void Start()
	{
		developmentPercent = PlayerPrefs.GetInt("UnlockedCardCount", 0) + PlayerPrefs.GetInt("Development", 0);
		developmentPercent *= 0.4f;
		GameObject[] array = startingDevelopments;
		foreach (GameObject obj in array)
		{
			if (Random.Range(0f, 100f) > developmentPercent)
			{
				Object.Destroy(obj);
			}
		}
	}
}