Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     backRt = transform.GetComponent<RectTransform> ();
     mapRt = transform.FindChild ("Map").GetComponent<RectTransform> ();
     offset = 150;
     windowSize = new Vector2 (Screen.width, Screen.height);
     cusorC = transform.FindChild ("Map/Organ_Cursor").GetComponent<cursor_controller> ();
     cusorC.SetSize (offset);
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     forNext = GameObject.Find ("ForNextScene").GetComponent<For_next> ();
     organC = GameObject.FindWithTag (forNext.myid.ToString()+"P_Master").GetComponent<organ_controller> ();
     cursorC = GameObject.Find ("Organ/Map/Organ_Cursor").GetComponent<cursor_controller> ();
     cursorRt = GameObject.Find ("Organ/Map/Organ_Cursor").GetComponent<RectTransform> ();
     myColor = GetComponent<Image> ();
     transform.SetSiblingIndex (0);
     domiColorList = Resources.LoadAll<Sprite>("G");
     neutralColor = Resources.Load<Sprite> ("GH");
 }
Esempio n. 3
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;
 }
Esempio n. 4
0
 IEnumerator WaitInit()
 {
     commons common = GameObject.FindWithTag ("commons").GetComponent<commons> ();
     forNext = GameObject.Find ("ForNextScene").GetComponent<For_next> ();
     while (!common.myOk) {
         yield return 0;
     }
     myParent = GameObject.Find ("Organ/Map");
     transform.SetParent (myParent.transform);
     cursor = GameObject.Find ("Organ_Cursor");
     cursorC = cursor.GetComponent<cursor_controller> ();
     cursorRt = cursor.GetComponent<RectTransform> ();
     cando = true;
 }
Esempio n. 5
0
    // Use this for initialization
    void Start()
    {
        if (photonView.isMine) {
            targetGroup = -10;
            summoning = false;
            savaDictSetting = false;
            itemSell = false;
            canSell = false;
            canSell2 = false;
            playerC = GetComponent<PlayerController> ();
            menu = GameObject.Find ("Menu");
            menu.GetComponent<UnityEngine.Canvas> ().enabled = false;
            organCanvas = GameObject.Find ("Organ").GetComponent<UnityEngine.Canvas> ();
            mySava = GameObject.Find ("Organ/Map/Organ_sava");
            ismenu = false;
            menu_list = new Transform[4];
            istype = 0;

            foreach (Transform child in menu.transform) {
                menu_list [istype] = child;
                istype++;
            }
            istype = 0;
            buttons = GameObject.Find ("Player_info").GetComponent<Button> ();
            cursorC = GameObject.Find ("Organ_Cursor").GetComponent<cursor_controller> ();
            destStack = new Stack<Vector2> (){};
        }
    }