entities test, scaling
This commit is contained in:
parent
f5952f30eb
commit
c210200bbe
3 changed files with 60 additions and 42 deletions
11
js/player.js
Normal file
11
js/player.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue