to new git
This commit is contained in:
@ -44,25 +44,25 @@ public class PickUpSpawner : MonoBehaviour
|
||||
|
||||
private IEnumerator SpawnNewPickUps()
|
||||
{
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
GameObject item;
|
||||
if(IsDisableCheck(out item))
|
||||
if (IsDisableCheck(out item))
|
||||
{
|
||||
yield return new WaitForSeconds(3);
|
||||
if (item != null)
|
||||
{
|
||||
item.transform.position = spawnPoints[Random.Range(0, spawnPoints.Count)].position;
|
||||
item.transform.position = spawnPoints[Random.Range(0, spawnPoints.Count)].Position;
|
||||
item.SetActive(true);
|
||||
}
|
||||
}
|
||||
yield return new WaitForSeconds(2);
|
||||
yield return new WaitForSeconds(2);
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsDisableCheck(out GameObject gameobj)
|
||||
{
|
||||
foreach(var pick in pickups)
|
||||
foreach (var pick in pickups)
|
||||
{
|
||||
if (!pick.activeInHierarchy)
|
||||
{
|
||||
|
Reference in New Issue
Block a user