Example #1
0
 public void init(GameObject nicon, int num=-100)
 {
     forNext = GameObject.Find ("ForNextScene").GetComponent<For_next> ();
     myOb = nicon;
     myObC = nicon.GetComponent<Sava_controler> ();
     rt = GetComponent<RectTransform> ();
     offset.x = ((nicon.transform.position.x - 250f) * 3f) / 5f;
     offset.y = ((nicon.transform.position.z - 250f) * 3f) / 5f;
     rt.anchoredPosition = offset;
     if (num != -100)
         myGroupNum = num;
     cursor = GameObject.Find ("Organ_Cursor");
     cursorC = cursor.GetComponent<cursor_controller> ();
     cursorRt = cursor.GetComponent<RectTransform> ();
     mycolor = gameObject.GetComponent<Image> ();
     myorgan = GameObject.FindWithTag (forNext.myid.ToString()+"P_Master").GetComponent<organ_controller> ();
     cando = true;
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     savaC = GetComponent<Sava_controler> ();
     anim = GetComponent<Animator> ();
     agent = GetComponent<NavMeshAgent> ();
 }