|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { computed, reactive } from 'vue'
|
|
|
|
|
import { RECIPROCAL } from '../level/def'
|
|
|
|
|
import { RECIPROCAL, STAGE_WIDTH, STAGE_HEIGHT } from '../level/def'
|
|
|
|
|
|
|
|
|
|
export interface Moveable {
|
|
|
|
|
x: number, // position on x-axis (fixed for the player)
|
|
|
|
@ -10,8 +10,8 @@ export interface Moveable {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const player = reactive({
|
|
|
|
|
x: 16,
|
|
|
|
|
y: 10,
|
|
|
|
|
x: (STAGE_WIDTH + 2) / 2,
|
|
|
|
|
y: (STAGE_HEIGHT + 2) / 2,
|
|
|
|
|
lastDir: 0,
|
|
|
|
|
vx: 0,
|
|
|
|
|
vy: 1, // always falling, because of gravity
|
|
|
|
|