GrandTabernacleAutoVI/js/game.js
2023-11-15 09:09:13 +01:00

30 lines
No EOL
787 B
JavaScript

Renderer = new Render("canvas", "./assets/map/map7_recadr.png");
Inp = new Input("canvas");
let players = [new Player(1, 100, 50, "rubiks"),
new Player(2, 500, 70, "atsuyo"),
new Player(3, 600, 70, "vincent"),
new Player(4, 700, 70, "migliore"),
new Player(5, 200, 30, "leroux"),
new Player(6, 700, 700, "lele")];
players[0].retrieveServerInfo(1,100,50,3);
players[1].dir=5;
players[1].visibleDir=5;
Renderer.AddPlayer(players[0]);
Renderer.AddPlayer(players[1]);
Renderer.AddPlayer(players[2]);
Renderer.AddPlayer(players[3]);
Renderer.AddPlayer(players[4]);
Renderer.AddPlayer(players[5]);
setInterval(game);
function game() {
players[0].update([],[]);
players[1].update([],[]);
//console.log(Inp.calculateAngle(500,500))
Renderer.ReloadAff();
}