mirror of
https://github.com/Sheldan/canvas.git
synced 2026-01-06 00:19:33 +00:00
survivors: spawning player in the middle of the window
This commit is contained in:
@@ -103,7 +103,7 @@ docReady(function () {
|
|||||||
|
|
||||||
ctx = canvas.getContext("2d");
|
ctx = canvas.getContext("2d");
|
||||||
config = new Config();
|
config = new Config();
|
||||||
let player = Player.generatePlayer();
|
let player = Player.generatePlayer(new Vector(window.innerWidth /2, window.innerHeight / 2));
|
||||||
|
|
||||||
world = new World(player, ctx, new Vector(window.innerWidth, window.innerHeight));
|
world = new World(player, ctx, new Vector(window.innerWidth, window.innerHeight));
|
||||||
state = new WorldState();
|
state = new WorldState();
|
||||||
|
|||||||
Reference in New Issue
Block a user