示例#1
0
文件: Sample.cs 项目: kssuab/first
    private void DrawMoveButton()
    {
        Rect rt = new Rect(Screen.width * 0.5f - 210.0f, Screen.height - 100.0f, 100.0f, 20.0f);

        if (GUI.Button(rt, "Move to first"))
        {
            currentEasyflow.MoveToFirst();
        }

        rt.x += 105.0f;
        if (GUI.Button(rt, "Prev"))
        {
            currentEasyflow.MovePrev();
        }

        rt.x += 105.0f;
        if (GUI.Button(rt, "Next"))
        {
            currentEasyflow.MoveNext();
        }

        rt.x += 105.0f;
        if (GUI.Button(rt, "Move to last"))
        {
            currentEasyflow.MoveToLast();
        }

        rt.x  = Screen.width * 0.5f - 105.0f;
        rt.y += 25.0f;
        if (GUI.Button(rt, "Move to :"))
        {
            currentEasyflow.MoveTo(moveButtonIndex);
            moveButtonIndex = Random.Range(0, currentEasyflow.coverList.Count);
        }

        rt.x += 105.0f;
        string text = moveButtonIndex.ToString();

        text = GUI.TextField(rt, text);
        if (!int.TryParse(text, out moveButtonIndex))
        {
            text = moveButtonIndex.ToString();
        }
    }
示例#2
0
        protected virtual void OnClickOther()
        {
            //Debug.Log("OnClick (Other) - " + cover.name + "   Pos: " + cover.GetPosition() + "   BeginPos: " + easyflow.beginPosition + "   FlowPos: " + easyflow.flowPosition);

            if (easyflow == null)
            {
                return;
            }

            if (easyflow.saveData.clickMode == CLICK_MODE.MoveTo ||
                easyflow.saveData.clickMode == CLICK_MODE.MoveToAndClickCenter ||
                easyflow.saveData.clickMode == CLICK_MODE.MoveToAndClickAll)
            {
                easyflow.MoveTo(cover);
            }

            if (easyflow.saveData.clickMode == CLICK_MODE.ClickAll ||
                easyflow.saveData.clickMode == CLICK_MODE.MoveToAndClickAll)
            {
                CallList();
            }
        }