Liberi
An exergame built for kids with CP!
Main Page
Classes
Files
File List
ParticleCleanup.cs
1
using
UnityEngine
;
2
using
System
.Collections;
3
7
[Script(ScriptRole.View)]
8
public
class
ParticleCleanup
: MonoBehaviour
9
{
10
void
Awake ()
11
{
12
StartCoroutine(CheckParticleFinishedAsync());
13
}
14
15
IEnumerator CheckParticleFinishedAsync ()
16
{
17
while
(particleSystem.IsAlive())
18
yield
return
new
WaitForSeconds(1f);
19
20
Sync
.
Despawn
(
this
);
21
}
22
}
Sync.Despawn
static void Despawn(GameObject go)
Despawn the given object.
Definition:
Sync.Static.cs:779
System
ParticleCleanup
Despawns a particle system after it finishes playing.
Definition:
ParticleCleanup.cs:8
UnityEngine
Sync
This class server two main functions: 1) As a MonoBehaviour, it allows for network synchronization of...
Definition:
Sync.cs:13
Liberi
Assets
Scripts
Components
ParticleCleanup.cs
Generated by
1.8.10