Firstborn/Assets/RPG Creation Kit/Scripts/Magic System/SpellExplodeAfter.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

32 lines
641 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace RPGCreationKit
{
/// <summary>
/// Destroys a GameObject after X seconds.
/// </summary>
public class SpellExplodeAfter : MonoBehaviour
{
public SpellProjectile thisSpell;
[SerializeField] public float time = 0;
SpellExplodeAfter(float time)
{
this.time = time;
}
// Update is called once per frame
void Start()
{
Invoke("Explode", time);
}
public void Explode()
{
thisSpell.Explode();
}
}
}