24 lines
434 B
C#
24 lines
434 B
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class ExplosionController : MonoBehaviour
|
||
|
|
{
|
||
|
|
[SerializeField] private float ttl = 0.25f; // seconds
|
||
|
|
// Start is called before the first frame update
|
||
|
|
void Start()
|
||
|
|
{
|
||
|
|
Invoke("Die", ttl);
|
||
|
|
}
|
||
|
|
|
||
|
|
void Die() {
|
||
|
|
Destroy(gameObject);
|
||
|
|
}
|
||
|
|
|
||
|
|
// Update is called once per frame
|
||
|
|
void Update()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|