コード例 #1
0
ファイル: ghost_icon.cs プロジェクト: ninhydrin/gg2d
 // 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");
 }
コード例 #2
0
ファイル: mapicon.cs プロジェクト: ninhydrin/gg2d
 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;
 }
コード例 #3
0
ファイル: organ_MG.cs プロジェクト: ninhydrin/gg2d
 // Use this for initialization
 void Start()
 {
     gameInfo = GameObject.Find ("GameMaster").GetComponent<GameInfo> ();
     myNum = forNext.myid;
     GetComponent<UnityEngine.UI.Image> ().sprite = Resources.LoadAll<Sprite> ("MMG") [gameInfo.myColorNum];
     rt = GetComponent<RectTransform> ();
     rt.localScale = new Vector3 (1f, 1f, 0);
     MG = GameObject.FindWithTag (forNext.myid.ToString () + "P_MG");
     organC = GameObject.FindWithTag (forNext.myid.ToString () + "P_Master").GetComponent<organ_controller> ();
     StartCoroutine (WaitInit ());
     offset = rt.anchoredPosition;
     offset.x = (MG.transform.position.x - 250f) * 0.6f;
     offset.y = (MG.transform.position.z - 250f) * 0.6f;
     rt.anchoredPosition = offset;
     imTarget = false;
     mycolor = gameObject.GetComponent<Image> ();
     myGroupNum = -10;
     transform.SetSiblingIndex (0);
 }
コード例 #4
0
ファイル: cursor_controller.cs プロジェクト: ninhydrin/gg2d
 IEnumerator WaitInit()
 {
     commons common = GameObject.FindWithTag ("commons").GetComponent<commons> ();
     forNext = GameObject.Find ("ForNextScene").GetComponent<For_next> ();
     while (!common.myOk) {
         yield return 0;
     }
     player = GameObject.FindWithTag (forNext.myid.ToString()+"P_Master");
     organC = player.GetComponent<organ_controller> ();
     cando = true;
 }
コード例 #5
0
ファイル: selector.cs プロジェクト: ninhydrin/gg2d
 IEnumerator WaitInit()
 {
     commons common = GameObject.FindWithTag ("commons").GetComponent<commons> ();
     forNext = GameObject.Find ("ForNextScene").GetComponent<For_next> ();
     while (!common.myOk) {
         yield return 0;
     }
     MG = GameObject.FindGameObjectWithTag (forNext.myid.ToString()+"P_MG").GetComponent<MG_func> ();
     organ = GameObject.FindWithTag (forNext.myid.ToString()+ "P_Master").GetComponent<organ_controller> ();
     rt.anchoredPosition = init_pos;
     cando = true;
 }