Initial Commit

This commit is contained in:
2026-04-01 15:46:15 +01:00
commit 72ae178fd1
12270 changed files with 3639153 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using UnityEngine;
public class SimpleEnemySpawner : MonoBehaviour
{
[SerializeField] private EnemyController enemyToSpawn;
[SerializeField] private Transform spawnPoint;
[SerializeField] private float timeBetweenSpawns;
[SerializeField] private int amountToSpawn;
private float spawnCounter;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
spawnCounter = timeBetweenSpawns;
}
// Update is called once per frame
void Update()
{
spawnCounter -= Time.deltaTime;
if(spawnCounter <= 0f)
{
spawnCounter = timeBetweenSpawns;
Instantiate(enemyToSpawn, spawnPoint.position, spawnPoint.rotation);
amountToSpawn--;
}
}
}