|
|
|
@ -9,7 +9,7 @@ import usePlayer from './util/usePlayer'
|
|
|
|
|
|
|
|
|
|
const { updateTime, timeOfDay, clock } = useTime()
|
|
|
|
|
const { player, direction, dx, dy } = usePlayer()
|
|
|
|
|
const { inputX, inputY, running, digging, paused } = useInput()
|
|
|
|
|
const { inputX, inputY, running, digging, paused, help } = useInput()
|
|
|
|
|
const level = createLevel(STAGE_WIDTH + 2, STAGE_HEIGHT + 2)
|
|
|
|
|
|
|
|
|
|
let animationFrame = 0
|
|
|
|
@ -125,5 +125,38 @@ onMounted(() => {
|
|
|
|
|
<template v-else>({{ clock }})</template>
|
|
|
|
|
<div>{{ player.vx }}, {{ player.vy }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="help" v-if="help">
|
|
|
|
|
<header>
|
|
|
|
|
<h1>How to play</h1>
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
<section>
|
|
|
|
|
<h2>Walk around: WASD or Arrow Keys</h2>
|
|
|
|
|
<p>A / Left: walk left</p>
|
|
|
|
|
<p>D / Right: walk right</p>
|
|
|
|
|
<p>W / Up: jump or climb up</p>
|
|
|
|
|
<p>S / Down: climb down</p>
|
|
|
|
|
<p>Hold Shift, to run.</p>
|
|
|
|
|
</section>
|
|
|
|
|
<section>
|
|
|
|
|
<h2>Dig Blocks: Left Mouse Key</h2>
|
|
|
|
|
<p>To dig a block, click on it with your left mouse key. Only adjacent blocks can be digged.</p>
|
|
|
|
|
<p><i>(not implemented, yet)</i></p>
|
|
|
|
|
</section>
|
|
|
|
|
<section>
|
|
|
|
|
<h2>Build / Set Blocks: Right Mouse Key</h2>
|
|
|
|
|
<p>To set a block, right click an empty position close to you.</p>
|
|
|
|
|
<p><i>(not implemented, yet)</i></p>
|
|
|
|
|
</section>
|
|
|
|
|
<section>
|
|
|
|
|
<h2>Inventory: I</h2>
|
|
|
|
|
<p>Press I to open the inventory and use the mouse to select an item. This item can then be put into the world with a right click.</p>
|
|
|
|
|
<p><i>(not implemented, yet)</i></p>
|
|
|
|
|
</section>
|
|
|
|
|
<p> </p>
|
|
|
|
|
<p> </p>
|
|
|
|
|
<p> </p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|