예제 #1
0
    public void ShowGameIcons(Action done)
    {
        this.gameObject.SetActive(true);

        ArrayList al = Assist.Tile(new Vector3(-216, -230, 0), itemList.Count, 3, 250, 80);

        for (int j = 0; j < itemList.Count; j++)
        {
            itemList[j].Self.SetActive(false);
        }
        itemList[0].Self.SetActive(true); //
        // TODO: 动画
        for (int i = 0; i < itemList.Count; i++)
        {
            RectTransform tempRectTrans = itemList[i].Self.GetComponent <RectTransform>();
            Vector3       startPos      = new Vector3(((Vector3)al[i]).x, (((Vector3)al[i]).z - 222) * -1 - 300, 0);
            tempRectTrans.anchoredPosition3D = startPos;
            GameObject next = null;
            if (i <= itemList.Count - 2)
            {
                next = itemList[i + 1].Self;
            }
            tempRectTrans.Moveto(new Vector3(startPos.x, startPos.y + 300, startPos.z), 0.3f).setDelay(0.1f * (i + 1)).setEase(LeanTweenType.easeInCubic).onComplete = () =>
            {
                if (next != null)
                {
                    next.SetActive(true);
                }
            };
        }
    }