IMHOTEP Framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
SphereEmitters.cs
1 using UnityEngine;
2 using System.Collections;
3 
4 public class SphereEmitters : MonoBehaviour {
5 
6  public GameObject sphere;
7 
8  public void OnEnable()
9  {
10  // Disable the sphere at startup:
11  //sphere.SetActive (false);
12  }
13 
14  public void activateSphere()
15  {
16  Animator sphereAnimator = sphere.GetComponent<Animator> ();
17  sphereAnimator.SetTrigger ("Activate");
18  sphere.GetComponent<MeshRenderer> ().material.SetFloat ("_AppearAmount", 0);
19 
20  // Make sure to show the sphere:
21  sphere.SetActive (true);
22  }
23 }