예제 #1
0
	PlaygroundParticlesC particles;		// Cached reference to the particle system

	IEnumerator Start () {

		// Cache a reference to the particle system
		particles = GetComponent<PlaygroundParticlesC>();

		// Set a particle as sticky if a negative value isn't set
		if (stickyParticle>-1) {
			while (!particles.IsReady())
				yield return null;
			particles.SetSticky (stickyParticle, stickyTransform.position+stickyOffset, stickyTransform.up, particles.stickyCollisionsSurfaceOffset, stickyTransform);
		}
	}