Files
pgs/Assets/Scripts/EffectController.cs

21 lines
451 B
C#
Raw Permalink Normal View History

2026-02-21 16:58:22 -08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Die when the animation is complete.
public class EffectController : MonoBehaviour
{
public bool diesByAnimation = true;
public float manualDeathTime = 1.0f;
public void AnimationDie() {
Destroy(gameObject);
}
private void Awake() {
if (!diesByAnimation) {
Invoke("AnimationDie", manualDeathTime);
}
}
}