1
0
forked from noxious/client

Minor improvements

This commit is contained in:
2024-09-29 01:07:53 +02:00
parent fda5224806
commit 5b31729f64
4 changed files with 9 additions and 8 deletions

View File

@ -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)