v1 #4
2 arquivos alterados com 8 adições e 4 exclusões
|
@ -1,13 +1,15 @@
|
||||||
let dt = 0;
|
let dt = 0;
|
||||||
let currentTime = new Date();
|
let currentTime = new Date();
|
||||||
function game() {
|
function game() {
|
||||||
if(player==null)
|
if(player==null){
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
player.update(maps[player.z].squares, maps[player.z].circles, dt);
|
player.update(maps[player.z].squares, maps[player.z].circles, dt);
|
||||||
players.forEach((p)=>{
|
players.forEach((p)=>{
|
||||||
if(p.z>=0)
|
if(p.z>=0) {
|
||||||
p.update(maps[p.z].squares,maps[p.z].circles);
|
p.update(maps[p.z].squares,maps[p.z].circles);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cars.forEach((c) => {
|
cars.forEach((c) => {
|
||||||
|
|
|
@ -43,7 +43,9 @@ let portals = [new Portal(250,457,0,516,789,1),//O
|
||||||
new Portal(231,475,5,131,313,6), //pour aller a l'étage (map6)
|
new Portal(231,475,5,131,313,6), //pour aller a l'étage (map6)
|
||||||
new Portal(115,353,6,317,493,5), //out map6 (pour aller a map5)
|
new Portal(115,353,6,317,493,5), //out map6 (pour aller a map5)
|
||||||
new Portal(948,517,7,740,815,0), //out map7
|
new Portal(948,517,7,740,815,0), //out map7
|
||||||
new Portal(1075,421,8,985,520,0) //out map8
|
new Portal(1075,421,8,985,520,0), //out map8
|
||||||
|
new Portal(209,731,8,235,182,8), //troll map8
|
||||||
|
new Portal(209,110,8,235,730,8) //troll map8
|
||||||
];
|
];
|
||||||
|
|
||||||
let map0Squares = [new Square(1064,371,0,126,125),new Square(1160,113,0,143,126),new Square(1017,113,0,146,80),new Square(1018,192,0,10,47),new Square(1028,227,0,45,12),new Square(1101,227,0,66,12),new Square(791,113,0,176,126),new Square(522,129,0,103,13),new Square(654,128,0,104,15),new Square(747,144,0,12,34),new Square(748,194,0,10,44),new Square(655,224,0,101,15),new Square(520,227,0,106,13),new Square(522,195,0,11,39),new Square(522,131,0,8,46),new Square(588,154,0,10,22),new Square(651,153,0,10,21),new Square(698,188,0,12,19),new Square(697,373,0,318,124),new Square(697,497,0,158,112),new Square(1001,629,0,188,155),new Square(696,626,0,159,158),new Square(281,627,0,173,156),new Square(168,243,0,61,250),new Square(229,259,0,87,218),new Square(311,242,0,62,254),new Square(296,112,0,79,95),new Square(2,0,0,1350,14),new Square(1337,2,0,130,927),new Square(119,909,0,1250,17),new Square(4,1,0,129,923),new Square(543,156,0,16,18),new Square(559,207,0,16,17),new Square(598,179,0,17,29),new Square(721,157,0,13,17),new Square(673,205,0,14,17)];
|
let map0Squares = [new Square(1064,371,0,126,125),new Square(1160,113,0,143,126),new Square(1017,113,0,146,80),new Square(1018,192,0,10,47),new Square(1028,227,0,45,12),new Square(1101,227,0,66,12),new Square(791,113,0,176,126),new Square(522,129,0,103,13),new Square(654,128,0,104,15),new Square(747,144,0,12,34),new Square(748,194,0,10,44),new Square(655,224,0,101,15),new Square(520,227,0,106,13),new Square(522,195,0,11,39),new Square(522,131,0,8,46),new Square(588,154,0,10,22),new Square(651,153,0,10,21),new Square(698,188,0,12,19),new Square(697,373,0,318,124),new Square(697,497,0,158,112),new Square(1001,629,0,188,155),new Square(696,626,0,159,158),new Square(281,627,0,173,156),new Square(168,243,0,61,250),new Square(229,259,0,87,218),new Square(311,242,0,62,254),new Square(296,112,0,79,95),new Square(2,0,0,1350,14),new Square(1337,2,0,130,927),new Square(119,909,0,1250,17),new Square(4,1,0,129,923),new Square(543,156,0,16,18),new Square(559,207,0,16,17),new Square(598,179,0,17,29),new Square(721,157,0,13,17),new Square(673,205,0,14,17)];
|
||||||
|
@ -73,7 +75,7 @@ let maps = [new Game_Map(portals.slice(0,8),0,map0Squares,[]),
|
||||||
new Game_Map(portals.slice(12,14),5,map5Squares,map5Circles),
|
new Game_Map(portals.slice(12,14),5,map5Squares,map5Circles),
|
||||||
new Game_Map(portals.slice(14,15),6,map6Squares,map6Circles),
|
new Game_Map(portals.slice(14,15),6,map6Squares,map6Circles),
|
||||||
new Game_Map(portals.slice(15,16),7,map7Squares,map7Circles),
|
new Game_Map(portals.slice(15,16),7,map7Squares,map7Circles),
|
||||||
new Game_Map(portals.slice(16,17),8,map8Squares,map8Circles)];
|
new Game_Map(portals.slice(16,19),8,map8Squares,map8Circles)];
|
||||||
|
|
||||||
players.push(new Player(-1,-50,-50,-1,"VOITURES",0));
|
players.push(new Player(-1,-50,-50,-1,"VOITURES",0));
|
||||||
|
|
||||||
|
|
Carregando…
Referência em uma nova issue