예제 #1
0
 public void OpenTip(List <string> contents, Vector3 location, float topEdge, float bottomEdge)
 {
     if (showTip == true)
     {
         return;
     }
     showTip = true;
     for (int i = 0; i < contents.Count; ++i)
     {
         GameObject obj = Instantiate(tipPrefab);
         obj.transform.parent     = GameRoot.GetInstance().TipUI.transform;
         obj.transform.localScale = Vector3.one;
         Tip script = obj.GetComponent <Tip>();
         script.InjectContent(contents[i]);
         obj.GetComponent <RectTransform>().position = location;
         tipCache.Add(obj);
     }
     showTop    = location + new Vector3(0, topEdge * sizeFactor, 0);
     showBottom = location - new Vector3(0, bottomEdge * sizeFactor, 0);
 }