You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
868 B
C#
34 lines
868 B
C#
1 month ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class FloorEnabler : MonoBehaviour
|
||
|
{
|
||
|
public SurfaceGenerator surfaceGenerator;
|
||
|
public List<GameObject> surfacePrefabs;
|
||
|
public List<GameObject> FloorObjs;
|
||
|
// Start is called before the first frame update
|
||
|
void Awake()
|
||
|
{
|
||
|
Starter();
|
||
|
}
|
||
|
void Starter()
|
||
|
{
|
||
|
int index=DataManager.Instance.CURRENTLEVELINDEX%surfacePrefabs.Count;
|
||
|
surfaceGenerator.surfacePrefab = surfacePrefabs[index];
|
||
|
FloorObjs[index].SetActive(true);
|
||
|
// for (int i = 0; i < surfacePrefabs.Count; i++)
|
||
|
// {
|
||
|
// if (i == DataManager.Instance.CURRENTLEVELINDEX)
|
||
|
// {
|
||
|
// }
|
||
|
// else
|
||
|
// {
|
||
|
// FloorObjs[i].SetActive(false);
|
||
|
// }
|
||
|
|
||
|
// }
|
||
|
}
|
||
|
|
||
|
}
|