Skip to content

Commit

Permalink
Improve level 2, improve menu ux
Browse files Browse the repository at this point in the history
  • Loading branch information
shezard committed Jul 6, 2023
1 parent cfebe9e commit 26bd0c7
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
8 changes: 7 additions & 1 deletion src/components/Menu/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,21 @@
Continue
</div>
{/if}
<br />
{/if}

{#if $store.game.running === 'continue'}
<div class="text-2xl text-white cursor-pointer action" on:click={runGame} on:keypress={runGame}>
Continue
Back to game
</div>
<br />
<div class="text-2xl text-white cursor-pointer action" on:click={loadGame} on:keypress={loadGame}>
Load
</div>
<div class="text-2xl text-white cursor-pointer action" on:click={saveGame} on:keypress={saveGame}>
Save
</div>
<br />
{/if}

<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/Script.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
wx={0.6}
wy={0.6}
wz={0.6}
rz={Math.PI}
rz={script.t}
on:click={handleContainer(script)}
{texture}
cursorName='interact'
Expand Down
2 changes: 1 addition & 1 deletion src/maps/level-0.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"texture": ["chest-1", "chest-1", "chest-1", "chest-1", "chest-0", "chest-1"],
"x": 6,
"y": 10,
"t": 1.5,
"t": 3.1415,
"content": ["sword"]
},
{
Expand Down
37 changes: 27 additions & 10 deletions src/maps/level-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1],
[1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
],
"textureMap": [
Expand Down Expand Up @@ -62,9 +62,9 @@
],
[
"wall-0",
"wall-0",
"wall-0",
"wall-0",
"wall-4",
"wall-4",
"wall-4",
"wall-0",
"wall-0",
"wall-0",
Expand Down Expand Up @@ -92,7 +92,7 @@
"wall-0",
"wall-0",
"wall-0",
"wall-0",
"wall-4",
"wall-0",
"wall-0",
"wall-0",
Expand Down Expand Up @@ -124,7 +124,7 @@
"wall-0",
"wall-0",
"wall-0",
"wall-0",
"wall-4",
"wall-0",
"wall-0",
"wall-0",
Expand Down Expand Up @@ -152,7 +152,7 @@
"wall-0",
"wall-0",
"wall-0",
"wall-0",
"wall-4",
"wall-0",
"wall-0",
"wall-0",
Expand All @@ -166,7 +166,7 @@
"wall-0",
"wall-0",
"wall-0",
"wall-0",
"wall-4",
"wall-0",
"wall-0",
"wall-0",
Expand Down Expand Up @@ -211,6 +211,12 @@
"x": 2,
"y": 10,
"t": 0
},
{
"id": 6,
"x": 8,
"y": 10,
"t": 0
}
],
"scripts": [
Expand Down Expand Up @@ -260,6 +266,17 @@
"x": 1,
"y": 1,
"t": 0
},
{
"id": 6,
"type": "container",
"name": "treasure chest",
"collision": true,
"texture": ["chest-1", "chest-1", "chest-1", "chest-1", "chest-0", "chest-1"],
"x": 5,
"y": 1,
"t": 0,
"content": []
}
]
}

0 comments on commit 26bd0c7

Please sign in to comment.