Beispiel #1
0
    private void SwitchNode()
    {
        //转换前节点名
        string[] str     = node.GetType().ToString().Split('.');
        string   output1 = str[str.Length - 1];

        node = node.NextNode();
        //转换后节点名
        str = node.GetType().ToString().Split('.');
        string output2 = str[str.Length - 1];

        Debug.Log("转换节点:由" + output1 + "至" + output2);
    }
Beispiel #2
0
    void Update()
    {
        //右键事件绑定
        if (Input.GetMouseButtonDown(1))
        {
            if (dm.isEffecting || dm.blockRightClick)
            {
                return;
            }
            else
            {
                ps.RightClick();
            }
        }
        //Esc 充当右键功能
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (dm.isEffecting || dm.blockRightClick)
            {
                return;
            }
            else
            {
                ps.RightClick();
            }
        }
        //滚轮作用绑定事件
        if (Input.GetAxis("Mouse ScrollWheel") > 0)
        {
            ps.MouseUpScroll(Input.GetAxis("Mouse ScrollWheel"));
        }
        if (Input.GetAxis("Mouse ScrollWheel") < 0)
        {
            ps.MouseDownScroll(Input.GetAxis("Mouse ScrollWheel"));
        }

        if (node == null)
        {
            // 游戏结束返回标题画面
            //Debug.Log("Game End, node null");
            //ps.SwitchTo_VerifyIterative("Title_Panel");
        }
        else if (node.end)
        {
            Debug.Log(node.GetType());
            SwitchNode();
        }
    }