forked from noxious/client
Minor improvements
This commit is contained in:
@ -6,7 +6,7 @@ import config from '@/config'
|
||||
export function useGamePointerHandlers(scene: Phaser.Scene, layer: Phaser.Tilemaps.TilemapLayer, waypoint: Ref<{ visible: boolean; x: number; y: number }>, camera: Phaser.Cameras.Scene2D.Camera) {
|
||||
const gameStore = useGameStore()
|
||||
const lastDragTime = ref(Date.now())
|
||||
const dragTimeout = 100 // 100ms timeout for dragging, to prevent accidental clicks
|
||||
const dragTimeout = 250 // 250ms timeout for dragging, to prevent accidental clicks
|
||||
|
||||
function updateWaypoint(pointer: Phaser.Input.Pointer) {
|
||||
const { x: px, y: py } = camera.getWorldPoint(pointer.x, pointer.y)
|
||||
|
@ -7,6 +7,9 @@ export function useCameraControls(scene: Phaser.Scene): any {
|
||||
const zoneStore = useZoneStore()
|
||||
const camera = scene.cameras.main
|
||||
|
||||
// Might improve image quality
|
||||
camera.setRoundPixels(true)
|
||||
|
||||
function onPointerDown(pointer: Phaser.Input.Pointer) {
|
||||
gameStore.setPlayerDraggingCamera(true)
|
||||
}
|
||||
|
Reference in New Issue
Block a user