Improving pinch (virtual joystick stops when pinch begins)
This commit is contained in:
parent
59b391e983
commit
f66e69cb75
5 changed files with 70 additions and 30 deletions
|
@ -1188,18 +1188,6 @@ ${escapedMessage}
|
|||
* @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
|
||||
*/
|
||||
update(time: number, delta: number) : void {
|
||||
if (this.cursorKeys.up.isDown) {
|
||||
//this.cameras.main.zoom *= 1.2;
|
||||
//this.scale.setGameSize(this.scale.width * 1.2, this.scale.height * 1.2);
|
||||
waScaleManager.zoomModifier *= 1.2;
|
||||
this.updateCameraOffset();
|
||||
} else if(this.cursorKeys.down.isDown) {
|
||||
//this.scale.setGameSize(this.scale.width * 0.8, this.scale.height * 0.8);
|
||||
//this.cameras.main.zoom *= 0.8;
|
||||
waScaleManager.zoomModifier /= 1.2;
|
||||
this.updateCameraOffset();
|
||||
}
|
||||
|
||||
mediaManager.setLastUpdateScene();
|
||||
this.currentTick = time;
|
||||
this.CurrentPlayer.moveUser(delta);
|
||||
|
@ -1499,4 +1487,9 @@ ${escapedMessage}
|
|||
message: 'If you want more information, you may contact us at: workadventure@thecodingmachine.com'
|
||||
});
|
||||
}
|
||||
|
||||
zoomByFactor(zoomFactor: number) {
|
||||
waScaleManager.zoomModifier *= zoomFactor;
|
||||
this.updateCameraOffset();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue