unibutton/js/player.js

11 lines
275 B
JavaScript
Raw Normal View History

2024-11-25 14:14:20 -05:00
function Player() {
let pos = { x: Math.random() * 1000 - 50, y: Math.random() * 1000 - 50 };
let camera = { x: -pos.x, y: -pos.y };
let vel = { x: 0, y: 0 };
this.camera = camera;
this.pos = pos;
this.vel = vel;
this.rot = 0;
this.dir = 1;
}