This commit is contained in:
root 2024-05-02 22:15:54 +02:00
parent 3d496c3057
commit 4ec7f9ad38

View File

@ -4,7 +4,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Sprite, useScene } from 'phavuer' import { Sprite, useScene } from 'phavuer'
import { ref } from 'vue' import { type Ref, ref } from 'vue'
import config from '@/config' import config from '@/config'
const props = defineProps({ const props = defineProps({
@ -13,8 +13,8 @@ const props = defineProps({
const scene = useScene() const scene = useScene()
const pointer_tile = ref(undefined); const pointer_tile = ref(undefined);
const x = ref(0); const x: Ref<number> = ref(0);
const y = ref(0); const y: Ref<number> = ref(0);
function onPointerClick(pointer: Phaser.Input.Pointer) { function onPointerClick(pointer: Phaser.Input.Pointer) {
const px = scene.cameras.main.worldView.x + pointer.x; const px = scene.cameras.main.worldView.x + pointer.x;