Example #1
0
        int getMouseButtonDown() {
            for (int key = 0; key < mouseButtonNum; key++) {
                if (Input.GetMouseButton(key)) {
                    return InputUtils.getMouseButtonKey(key);
                }
            }

            return 0;
        }
Example #2
0
        int getMouseButtonDown()
        {
            //default mouse button key = left mouse button
            var defaultKey = 0;

            for (int key = 0; key < mouseButtonNum; key++)
            {
                if (Input.GetMouseButton(key))
                {
                    defaultKey = key;
                    break;
                }
            }
            return(InputUtils.getMouseButtonKey(defaultKey));
        }