Beispiel #1
0
    void Start()
    {
        instance = this;

        list.getDiffCallback     = difficult.GetDiff;
        difficult.changeCallback = list.OnDiffChange;

        Global.init(() =>
        {
            Debug.Log("配置文件加载完毕。");
            list.createListComplete = () =>
            {
                if (Guide.instance != null)
                {
                    Guide.instance.Show();
                }
            };

            list.CreateList();
            DataUtils.RandomCharacter();

            //测试
            if (DataUtils.runingAutoMode)
            {
                Invoke("AutoGoNext", 3);
            }
        });
        pressTime = Time.time;
    }
Beispiel #2
0
    private void SwitchInStep(int index)
    {
        Debug.Log("新手引导:" + index);
        Vector3 p;

        switch (index)
        {
        case 0:
            title = GameObject.Find("Title").transform.GetComponent <Title>();
            title.canPressCancel = title.canPressDown = title.canPressEnter = title.canPressLeft = title.canPressRight = title.canPressUp = false;
            break;

        case 3:
            startBtn = title.transform.Find("StartText");
            Vector3 pos = startBtn.position;
            pos.z = -10;
            startBtn.transform.position = pos;
            Invoke("CanPressEnterInTitle", 0.3f);
            break;

        case 4:
            break;

        case 5:
            songList = GameObject.Find("Main").GetComponent <SongListMain>();
            songList.canPressCancel = songList.canPressDown = songList.canPressEnter = songList.canPressLeft = songList.canPressRight = songList.canPressUp = false;
            Transform t = songList.transform.Find("Difficult/Normal");
            p          = t.position;
            p.z        = -10;
            t.position = p;
            //songList.list.GetXiaoPingGouItem();
            break;

        case 6:
            Transform songCard = songList.list.cards[0].transform;
            songList.list.isScroll = false;
            p   = songCard.transform.position;
            p.z = -10;
            songCard.position = p;
            break;

        case 7:
            p   = songList.list.cards[0].transform.localPosition;
            p.z = 0;
            songList.list.cards[0].transform.localPosition = p;

            p   = songList.okBtn.transform.position;
            p.z = -10;
            songList.okBtn.transform.position = p;
            Invoke("CanPressEnterInSongList", 0.2f);
            break;

        case 8:
            ps = GameObject.Find("Main").transform.GetComponent <PropScene>();
            ps.canPressCancel = ps.canPressDown = ps.canPressEnter = ps.canPressLeft = ps.canPressRight = ps.canPressUp = false;
            p   = ps.okBtn.transform.position;
            p.z = -10;
            ps.okBtn.transform.position = p;
            break;

        case 9:
            Invoke("CanPressEnterInProp", 0.2f);
            p   = ps.okBtn.transform.localPosition;
            p.z = 0;
            ps.okBtn.transform.position = p;
            break;
        }
    }