コード例 #1
0
        public override void onGuiOpen()
        {
            this.selectedWorld = null;
            this.cachedWorlds  = GuiScreenWorldSelect.getSavedWorldData();

            int y = -70;
            int i;

            for (i = 0; i < this.cachedWorlds.Count; i++)
            {
                GameObject g = GameObject.Instantiate(this.worldTilePrefab);
                g.GetComponent <PlayWorldButton>().init(this.cachedWorlds[i], this, i);

                RectTransform rt = g.GetComponent <RectTransform>();
                rt.transform.SetParent(this.worldTileWrapperObj, true);
                rt.anchoredPosition     = new Vector3(0, y, 0);
                rt.transform.localScale = Vector3.one;
                y -= 130;
            }

            this.worldTileWrapperObj.sizeDelta = new Vector2(this.worldTileWrapperObj.sizeDelta.x, (i * 130) + 10);
        }
コード例 #2
0
 public override void onGuiOpen()
 {
     this.buttonCreate.interactable = false;
     this.setWorldTypeBtnText();
     this.cachedWorlds = GuiScreenWorldSelect.getSavedWorldData();
 }