Minor bug fix

This commit is contained in:
Dennis Postma 2024-09-28 21:53:21 +02:00
parent 494576b284
commit c2ae271306

View File

@ -5,7 +5,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) { 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 gameStore = useGameStore()
const lastDragTime = ref(0) const lastDragTime = ref(Date.now())
const dragTimeout = 100 // 100ms timeout for dragging, to prevent accidental clicks const dragTimeout = 100 // 100ms timeout for dragging, to prevent accidental clicks
function updateWaypoint(pointer: Phaser.Input.Pointer) { function updateWaypoint(pointer: Phaser.Input.Pointer) {