화면의 어느 부분을 터치 한 후 몇 가지 작업을 수행해야합니다. 현재 다음과 같은 것을 사용하고 있습니다.
update: function() {
if (this.game.input.activePointer.isDown) {
this.game.input.keyboard.onDownCallback = null;
this.start();
}
}
그러나 나는 그것이 옳지 않다고 생각하지만 아마도 키보드로하는 것처럼 콜백을 사용할 수있을 것이다.
this.game.input.keyboard.onDownCallback = function(e){
this.game.input.keyboard.onDownCallback = null;
self.start();
}
업데이트를 확인하는 대신 터치시 콜백을 사용하는 방법이 있습니까?
this.game.input.onDown.add(function() {
console.log("input captured");
});
저것과 같이 쉬운. 마우스 및 터치에서 작동합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다