2026-03-20 11:56:50 -04:00
|
|
|
|
using UnityEngine;
|
2025-10-03 00:02:43 -04:00
|
|
|
|
|
|
|
|
|
|
namespace DamageNumbersPro.Demo
|
|
|
|
|
|
{
|
|
|
|
|
|
public class DNP_CubeSpawner : MonoBehaviour
|
|
|
|
|
|
{
|
|
|
|
|
|
public float delay = 0.2f;
|
|
|
|
|
|
public GameObject cube;
|
|
|
|
|
|
|
2026-03-20 11:56:50 -04:00
|
|
|
|
private void Start()
|
2025-10-03 00:02:43 -04:00
|
|
|
|
{
|
|
|
|
|
|
InvokeRepeating("SpawnCube", 0, delay);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-20 11:56:50 -04:00
|
|
|
|
private void SpawnCube()
|
2025-10-03 00:02:43 -04:00
|
|
|
|
{
|
2026-03-20 11:56:50 -04:00
|
|
|
|
var newCube = Instantiate(cube);
|
2025-10-03 00:02:43 -04:00
|
|
|
|
newCube.SetActive(true);
|
|
|
|
|
|
newCube.transform.SetParent(transform, true);
|
|
|
|
|
|
newCube.transform.localScale = Vector3.one;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-03-20 11:56:50 -04:00
|
|
|
|
}
|