parent
908e29711a
commit
273242b943
Binary file not shown.
Binary file not shown.
@ -1,8 +1,14 @@
|
||||
import {Vec2} from './math.js';
|
||||
|
||||
export default class Camera {
|
||||
constructor() {
|
||||
this.pos = new Vec2(0, 0);
|
||||
this.size = new Vec2(500, 224);
|
||||
}
|
||||
import {Vec2} from './math.js';
|
||||
|
||||
export default class Camera {
|
||||
constructor() {
|
||||
this.pos = new Vec2(0, 0);
|
||||
this.size = new Vec2(500, 224);
|
||||
}
|
||||
|
||||
setPos(player) {
|
||||
if (player.pos.x > this.size.x / 2) {
|
||||
this.pos.x = player.pos.x - this.size.x / 2;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
export let levelSelected = '1-1';
|
||||
|
||||
export function loadNextLevel(level) {
|
||||
levelSelected = '1-' + level;
|
||||
}
|
Loading…
Reference in new issue