示例#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());
         }
     }
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     magnet = (MagneticSphere) (gameObject.GetComponent("MagneticSphere"));
 }