fix player collision box

main
Norman Köhring 1 year ago
parent 43d6932716
commit 94bdb0a9c8

@ -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

Loading…
Cancel
Save