some more tweaks with smooth zooming control

This commit is contained in:
Hanusiak Piotr
2021-12-02 14:44:13 +01:00
parent 092daa245f
commit ddaa81a7ac
3 changed files with 54 additions and 18 deletions
+3 -3
View File
@@ -788,7 +788,7 @@ export class GameScene extends DirtyScene {
for (const zone of zones) {
for (const property of zone.properties ?? []) {
if (property.name === 'focusable' && property.value === true) {
this.cameraManager.changeCameraFocus(zone);
this.cameraManager.enterFocusMode(zone);
break;
}
}
@@ -802,7 +802,7 @@ export class GameScene extends DirtyScene {
for (const zone of zones) {
for (const property of zone.properties ?? []) {
if (property.name === 'focusable' && property.value === true) {
this.cameraManager.startFollow(this.CurrentPlayer);
this.cameraManager.leaveFocusMode(this.CurrentPlayer);
break;
}
}
@@ -1954,7 +1954,7 @@ ${escapedMessage}
}
zoomByFactor(zoomFactor: number) {
if (waScaleManager.isZoomingViaPlayerInputLocked()) {
if (this.cameraManager.isCameraLocked()) {
return;
}
waScaleManager.zoomModifier *= zoomFactor;