Esempio n. 1
0
 private void OnTriggerStay(Collider other)
 {
     if (other.gameObject.CompareTag("MagneticSphere"))
     {
         MagneticSphere ms = other.GetComponent <MagneticSphere>();
         if (Input.GetKeyUp(KeyCode.Mouse0) && ms.isEnabled)
         {
             StartCoroutine(ms.Disappear());
             StartCoroutine(ms.Recreate());
         }
     }
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     magnet = (MagneticSphere) (gameObject.GetComponent("MagneticSphere"));
 }