Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*****************************************************
- // Author: The Messy Coder
- // Date: January 2022
- // For this video review: https://youtu.be/d8Oe1ydME7E
- // Please support by following on Twitch & social media
- // Twitch: www.Twitch.tv/TheMessyCoder
- // YouTube: www.YouTube.com/TheMessyCoder
- // Facebook: www.Facebook.com/TheMessyCoder
- // Twitter: www.Twitter.com/TheMessyCoder
- *****************************************************/
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.Events;
- namespace Messy
- {
- public class CheckParticles : MonoBehaviour
- {
- public UnityEvent DoSomething;
- public List<ParticleSystem> particles;
- public void CheckFlames()
- {
- int _checked = 0;
- foreach (var particle in particles)
- {
- if (particle.isPlaying == true)
- {
- _checked++;
- continue;
- }
- }
- if (_checked == particles.Count)
- {
- DoSomething.Invoke();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment