forked from noxious/client
npm run format, started working on follow player logic, refactor some camera logic
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user