// Use this for initialization void Start() { CostText = transform.FindChild ("Cost").GetComponent<Text> (); if (releaseCost > 0) { CostText.text = releaseCost.ToString (); } else { CostText.text = cost.ToString (); } SnameText = transform.FindChild ("Sname").GetComponent<Text> (); Myface = transform.FindChild ("Face_image").GetComponent<Image> (); myMana = GameObject.Find ("Mana").GetComponent<Mana_manager> (); SnameText.text = savaName; Myface.sprite = face; Cando = true; releasing = false; }
// Use this for initialization void Start() { forNext = GameObject.Find ("ForNextScene").GetComponent<For_next> (); entrys = transform.FindChild ("Entry_list"); entry_num = entrys.childCount; rt = transform.FindChild ("Menu_selector").GetComponent<RectTransform> (); myselector = transform.FindChild ("Menu_selector").GetComponent<Image> (); Mana = GameObject.Find ("Mana").GetComponent<Mana_manager> (); init_pos = new Vector2 (0f, -20f); rt.anchoredPosition = init_pos; updown = 21f; point = 0; entry_list = new Transform [entry_num]; int count = 0; foreach (Transform child in entrys) { child.GetComponent<RectTransform> ().anchoredPosition = init_pos; init_pos.y -= 21f; entry_list [count] = child; count++; } init_pos = new Vector2 (0f, -20f); init_pos = new Vector2 (0f, -100f); rt.position = init_pos; savaGroupNum = 1; coflag = false; cantReleasing = false; StartCoroutine (WaitInit ()); }