how to get activePointer pressed duration of sprite in Phaser

前端 未结 2 975
南笙
南笙 2021-01-17 04:45

I\'m creating pinball game using Phaser Framework.

When the ball holder is pressed (please check attached screenshot so you have an idea what I mean ball holder), d

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-17 05:41

    in phaser 3 something like

    function update(){
     var duration = 0
     if( this.input.activePointer.isDown ){
      duration++;
     }
    }
    

提交回复
热议问题