38 lines
736 B
C#
38 lines
736 B
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class RefreshSeason : MonoBehaviour
|
|
{
|
|
public List<GameObject> objectsNormal = new List<GameObject>();
|
|
|
|
public List<GameObject> objectsIce = new List<GameObject>();
|
|
|
|
public void Start()
|
|
{
|
|
if (GameController.Instance == null)
|
|
{
|
|
return;
|
|
}
|
|
if (GameController.Instance.iceLevel)
|
|
{
|
|
for (int i = 0; i < objectsNormal.Count; i++)
|
|
{
|
|
Object.DestroyImmediate(objectsNormal[i], true);
|
|
}
|
|
objectsNormal.Clear();
|
|
for (int j = 0; j < objectsIce.Count; j++)
|
|
{
|
|
objectsIce[j].SetActive(true);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
for (int k = 0; k < objectsIce.Count; k++)
|
|
{
|
|
Object.DestroyImmediate(objectsIce[k], true);
|
|
}
|
|
objectsIce.Clear();
|
|
}
|
|
}
|
|
}
|