Esempio n. 1
0
    void Update()
    {
        if (Input.GetMouseButtonDown(0) && m_mouseOveringCheck.isMouseOver)
        {
            m_mouseFollowingBehaviour.ActivateBehaviour();
        }

        if (m_mouseFollowingBehaviour.IsActive && Input.GetMouseButtonUp(0))
        {
            m_mouseFollowingBehaviour.DeactivateBehaviour();
        }
    }
Esempio n. 2
0
    void Update()                            // WIP: INPUT => Could be using Command System
    {
        if (Input.GetKeyDown(KeyCode.Space)) // WIP: Need to change the input, otherwise will conflict when writing inside nodes
        {
            GoToCenter();
        }

        //if (Input.GetMouseButtonDown(1))
        //    CreateNode();

        if (Input.GetMouseButtonDown(2))
        {
            m_mouseFollowingBehaviour.ActivateBehaviour();
        }

        if (m_mouseFollowingBehaviour.IsActive && Input.GetMouseButtonUp(2))
        {
            m_mouseFollowingBehaviour.DeactivateBehaviour();
        }
    }