2025-06-04 02:54:06 +02:00

37 lines
737 B
C#

using System;
using System.Collections.Generic;
using System.Diagnostics;
using UnityEngine;
using static Unity.Collections.Unicode;
public class SpawnSolarPanel : MonoBehaviour
{
public GameObject solarPanel;
public Vector3 spawnPosition;
public int maxSpawnCount = 8;
public int currentSpawnCount = 0;
public List<GameObject> solarPanels;
public void Start()
{
solarPanels = new List<GameObject>();
}
public List<GameObject> getSolarPanels()
{
return this.solarPanels;
}
public void destroyPanels()
{
currentSpawnCount = 0;
foreach (var panelSolar in this.solarPanels)
{
Destroy(panelSolar);
}
solarPanels = new List<GameObject>();
}
}