vfxScript.cs 452 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class vfxScript : MonoBehaviour
  5. {
  6. public float destroyTimer = 5f;
  7. // public Transform target;
  8. // public Vector3 offsetVFX;
  9. void Update()
  10. {
  11. //transform.position = target.position + offsetVFX;
  12. destroyTimer -= Time.deltaTime;
  13. if(destroyTimer < 0){
  14. Destroy(gameObject);
  15. }
  16. }
  17. }