1
0
forked from noxious/client

npm run format, started working on follow player logic, refactor some camera logic

This commit is contained in:
2024-09-22 02:14:32 +02:00
parent 42291b93eb
commit 9b592d6c7c
14 changed files with 101 additions and 111 deletions

View File

@ -13,7 +13,8 @@ export const useGameStore = defineStore('game', {
user: null as User | null,
character: null as Character | null,
isGmPanelOpen: false,
isMovingCamera: false,
isPlayerDraggingCamera: false,
isCameraFollowingCharacter: false,
isChatOpen: false,
isUserPanelOpen: false
}),
@ -93,11 +94,17 @@ export const useGameStore = defineStore('game', {
toggleGmPanel() {
this.isGmPanelOpen = !this.isGmPanelOpen
},
toggleMovingCamera() {
this.isMovingCamera = !this.isMovingCamera
togglePlayerDraggingCamera() {
this.isPlayerDraggingCamera = !this.isPlayerDraggingCamera
},
setMovingCamera(moving: boolean) {
this.isMovingCamera = moving
setPlayerDraggingCamera(moving: boolean) {
this.isPlayerDraggingCamera = moving
},
toggleCameraFollowingCharacter() {
this.isCameraFollowingCharacter = !this.isCameraFollowingCharacter
},
setCameraFollowingCharacter(following: boolean) {
this.isCameraFollowingCharacter = following
},
toggleChat() {
this.isChatOpen = !this.isChatOpen
@ -145,7 +152,7 @@ export const useGameStore = defineStore('game', {
this.user = null
this.character = null
this.isGmPanelOpen = false
this.isMovingCamera = false
this.isPlayerDraggingCamera = false
this.isChatOpen = false
this.isUserPanelOpen = false
}