subtle changes in CameraManager in order to distinguish between setPosition and focusOn
This commit is contained in:
parent
5f26a39a5d
commit
4ebc55a429
2 changed files with 73 additions and 24 deletions
|
@ -561,7 +561,7 @@ export class GameScene extends DirtyScene {
|
|||
waScaleManager
|
||||
);
|
||||
biggestAvailableAreaStore.recompute();
|
||||
this.cameraManager.startFollow(this.CurrentPlayer);
|
||||
this.cameraManager.startFollowPlayer(this.CurrentPlayer);
|
||||
|
||||
this.animatedTiles.init(this.Map);
|
||||
this.events.on("tileanimationupdate", () => (this.dirty = true));
|
||||
|
@ -1072,8 +1072,7 @@ ${escapedMessage}
|
|||
|
||||
this.iframeSubscriptionList.push(
|
||||
iframeListener.cameraSetPositionStream.subscribe((cameraSetPositionEvent) => {
|
||||
// this.cameraManager.enterFocusMode({ ...cameraSetPositionEvent }, undefined, cameraSetPositionEvent.smooth ? 1000 : 0);
|
||||
console.log("camera set position");
|
||||
this.cameraManager.setPosition({ ...cameraSetPositionEvent }, cameraSetPositionEvent.smooth ? 1000 : 0);
|
||||
})
|
||||
);
|
||||
|
||||
|
@ -2045,7 +2044,7 @@ ${escapedMessage}
|
|||
}
|
||||
|
||||
zoomByFactor(zoomFactor: number) {
|
||||
if (this.cameraManager.isCameraLocked()) {
|
||||
if (this.cameraManager.isCameraZoomLocked()) {
|
||||
return;
|
||||
}
|
||||
waScaleManager.zoomModifier *= zoomFactor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue