当前位置:网站首页>【Cocos Creator 3.5.1】event. Use of getbutton()

【Cocos Creator 3.5.1】event. Use of getbutton()

2022-06-27 05:44:00 CN-Dust

Usage mode :

    private onMouseUp(event: EventMouse) {
    
        if (event.getButton() === 0) {
    
            this.jumpByStep(1);
        } else if (event.getButton() === 2) {
    
            this.jumpByStep(2);
        }
    }

describe

(method) EventMouse.getButton(): number
@en — Returns mouse button code.
@zh —  Get mouse button .
原网站

版权声明
本文为[CN-Dust]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206270534251804.html