map options

This commit is contained in:
Ota Prokopec 2023-04-17 18:49:34 +02:00
parent 7ae7e3ced1
commit 5f5e54b51a
3 changed files with 11 additions and 5 deletions

View File

@ -59,9 +59,12 @@
options={{
trackUserLocation: true,
showUserHeading: true,
maximumAge: 1500,
positionOptions: {
enableHighAccuracy: true,
},
showUserLocation: true,
showAccuracyCircle: false,
}}
bind:trigger
on:trackuserlocationstart={() => {}}

View File

@ -29,7 +29,7 @@
INFO: Info,
}
$: console.log({ checkPoints: gameData.checkPoints })
$: console.log(gameData.checkPoints[client.pos], gameData.checkPoints, client.pos)
export let control: AnswerState = null
let view: 'question' | 'map' | 'end' | 'start' | 'start-map' = 'start-map'
@ -51,8 +51,6 @@
$: if (gameData.checkPoints[client.pos].CPType === 'INFO' && !$userProgressLoading) control = 'not-control'
$: console.log(control)
const nextQuestion = () => {
//další otázka
control = null
@ -64,7 +62,7 @@
}
$: checkPoint = gameData.checkPoints[client.pos]
$: checkPointType = checkPoint.CPType
$: checkPointType = checkPoint?.CPType
let page = null
$: page = view === 'question' ? components[checkPointType] : null

View File

@ -28,6 +28,8 @@
$: if ($gameData) view = 'experience-preview'
let view: 'experience-play' | 'experience-loading' | 'experience-preview' = 'experience-loading'
const deleteProgress = () => {}
</script>
{#if view === 'experience-loading'}
@ -82,9 +84,12 @@
</div>
</div>
{#if $gameData.checkPoints.length}
{#if $gameData.checkPoints.length && !($gameData.ExpCPsID.length === $userProgress.length)}
<Button on:click={() => (view = 'experience-play')} primary>{$userProgress.length ? 'Pokračovat' : 'Hrát'}</Button>
{/if}
{#if $userProgress.length}
<Button on:click={() => deleteProgress()} primary>resetovat progress</Button>
{/if}
</Overlay>
{:else if view === 'experience-play'}
<Renderer gameData={$gameData} />