Created
December 14, 2017 14:52
-
-
Save tsubaki/8ca221e21365f8930cdcdaee38e4cc2e to your computer and use it in GitHub Desktop.
パーティクルの生成
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ParticlePlaying : MonoBehaviour { | |
private bool isPlaying; | |
[SerializeField] ParticleSystem particle; | |
public void Switch () | |
{ | |
if (isPlaying) { | |
particle.Play (true); | |
} else { | |
particle.Stop (true, ParticleSystemStopBehavior.StopEmitting); | |
} | |
isPlaying = !isPlaying; | |
} | |
} |
Author
tsubaki
commented
Dec 14, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment