Пример #1
0
    private void Start()
    {
        float bottomHeight = PlatformHelper.GetBottomHeight();

        (base.transform as RectTransform).anchoredPosition = new Vector2(0f, bottomHeight);
        if (this.bottomline != null)
        {
            this.bottomline.anchoredPosition = new Vector2(0f, -bottomHeight / GameLogic.WidthScaleAll);
        }
    }
Пример #2
0
 private void init()
 {
     if (!this.bInit)
     {
         this.bInit = true;
         for (int i = 0; i < 5; i++)
         {
             if (i != 2)
             {
                 object[] objArray1 = new object[] { i };
                 this.locksimage[i] = base.transform.Find(Utils.FormatString("Button_{0}/child/child/Button/fg/Lock", objArray1)).gameObject;
                 object[] objArray2 = new object[] { i };
                 this.images[i] = base.transform.Find(Utils.FormatString("Button_{0}/child/child/Button/fg/Image", objArray2)).gameObject;
                 object[] objArray3 = new object[] { i };
                 this.buttons[i] = base.transform.Find(Utils.FormatString("Button_{0}/child/child/Button", objArray3)).GetComponent <ButtonCtrl>();
                 this.locks[i]   = true;
             }
             else
             {
                 this.locks[i] = false;
             }
             object[] args = new object[] { i };
             this.texts[i] = base.transform.Find(Utils.FormatString("Button_{0}/child/child/Button/fg/Text", args)).GetComponent <Text>();
             object[]  objArray5 = new object[] { i };
             Transform transform = base.transform.Find(Utils.FormatString("Button_{0}/child/child/Button/fg/RedNode", objArray5));
             if (transform != null)
             {
                 this.mReds[i] = transform.GetComponent <RedNodeCtrl>();
             }
         }
         float bottomHeight = PlatformHelper.GetBottomHeight();
         (base.transform as RectTransform).anchoredPosition = new Vector2(0f, bottomHeight);
         this.bottomline = base.transform.Find("Bottom");
         if (this.bottomline != null)
         {
             RectTransform bottomline = this.bottomline as RectTransform;
             bottomline.anchoredPosition = new Vector2(0f, -bottomHeight / GameLogic.WidthScaleAll);
         }
     }
 }