ajouts des autres map
This commit is contained in:
parent
dcc2b9889f
commit
3f82ef27d6
6 changed files with 37 additions and 9 deletions
BIN
public_html/assets/map/map5.jpg
Normal file
BIN
public_html/assets/map/map5.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 198 KiB |
BIN
public_html/assets/map/map6.jpg
Normal file
BIN
public_html/assets/map/map6.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 141 KiB |
BIN
public_html/assets/map/map7.jpg
Normal file
BIN
public_html/assets/map/map7.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 308 KiB |
BIN
public_html/assets/map/map8.jpg
Normal file
BIN
public_html/assets/map/map8.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 356 KiB |
|
@ -28,26 +28,44 @@ let cars = [new Car(1, 7),
|
|||
//new Car(0, 45),
|
||||
new Car(0, 52)];
|
||||
let portals = [new Portal(250,457,0,516,789,1),//O
|
||||
new Portal(344,758,0,500,500,0), // SO
|
||||
new Portal(344,758,0,50,852,4), // SO
|
||||
new Portal(1190,211,0,500,500,0),// NE
|
||||
new Portal(862,213,0,500,500,0), // N
|
||||
new Portal(862,213,0,200,147,5), // N
|
||||
new Portal(1126,472,0,583,810,3),// E
|
||||
new Portal(1076,768,0,484,898,2),// SE
|
||||
new Portal(721,767,0,500,500,0), // S
|
||||
new Portal(970,476,0,500,500,0),//Mid
|
||||
new Portal(721,767,0,917,547,7), // S -> grotte chelou
|
||||
new Portal(970,476,0,1056,449,8),//Mid -> Poudlar
|
||||
new Portal(617,154,1,274,244,0),//out map 1
|
||||
new Portal(95,561,2,989,694,0), //out map 2
|
||||
new Portal(569,828,3,1152,519,0)];//out map 3
|
||||
new Portal(569,828,3,1152,519,0),//out map 3
|
||||
new Portal(105, 852,4,365,800,0), //out map 4
|
||||
new Portal(110,122,5,880,255,0), //out map 5
|
||||
new Portal(231,480,5,131,313,6), //pour aller a l'étage (map6)
|
||||
new Portal(123,353,6,317,493,5), //out map6 (pour aller a map5)
|
||||
new Portal(948,517,7,740,815,0), //out map7
|
||||
new Portal(1075,421,8,985,520,0) //out 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 map1Squares = [new Square(1,0,1,1020,160),new Square(868,48,1,153,969),new Square(2,838,1,1019,182),new Square(1,0,1,148,998)];
|
||||
let map2Squares = [new Square(25,936,2,989,83),new Square(1,1,2,98,974),new Square(5,8,2,1002,250),new Square(941,10,2,80,1002),new Square(816,617,2,146,168),new Square(764,252,2,48,214),new Square(805,282,2,154,92),new Square(406,233,2,195,166),new Square(94,418,2,155,88),new Square(94,277,2,127,68),new Square(198,762,2,60,103),new Square(225,880,2,53,30),new Square(116,854,2,35,32)];
|
||||
let map3Squares = [new Square(19,836,3,857,48),new Square(706,324,3,180,531),new Square(640,321,3,75,168),new Square(832,10,3,60,325),new Square(3,2,3,843,165),new Square(354,48,3,90,302),new Square(256,321,3,287,165),new Square(1,1,3,62,374),new Square(51,320,3,109,157),new Square(4,434,3,90,436),new Square(146,680,3,124,71),new Square(92,754,3,32,88),new Square(290,554,3,220,36),new Square(708,150,3,87,68),new Square(323,206,3,39,59),new Square(50,127,3,72,93),new Square(448,648,3,61,44),new Square(578,645,3,92,45),new Square(802,236,3,36,60)];
|
||||
|
||||
|
||||
let map4Squares = []
|
||||
let map5Squares = []
|
||||
let map6Squares = []
|
||||
let map7Squares = []
|
||||
let map8Squares = []
|
||||
|
||||
let maps = [new Game_Map(portals.slice(0,8),0,map0Squares,[]),
|
||||
new Game_Map(portals.slice(8,9),1,map1Squares,[]),
|
||||
new Game_Map(portals.slice(9,10),2,map2Squares,[]),
|
||||
new Game_Map(portals.slice(10,11),3,map3Squares,[])];
|
||||
new Game_Map(portals.slice(10,11),3,map3Squares,[]),
|
||||
new Game_Map(portals.slice(11,12),4,map4Squares,[]),
|
||||
new Game_Map(portals.slice(12,14),5,map5Squares,[]),
|
||||
new Game_Map(portals.slice(14,15),6,map6Squares,[]),
|
||||
new Game_Map(portals.slice(15,16),7,map7Squares,[]),
|
||||
new Game_Map(portals.slice(16,17),8,map8Squares,[])];
|
||||
|
||||
players.push(new Player(-1,-50,-50,-1,"VOITURES",0));
|
||||
|
||||
|
|
|
@ -11,6 +11,11 @@ const map0_night = new Image();
|
|||
const map1 = new Image();
|
||||
const map2 = new Image();
|
||||
const map3 = new Image();
|
||||
const map4 = new Image();
|
||||
const map5 = new Image();
|
||||
const map6 = new Image();
|
||||
const map7 = new Image();
|
||||
const map8 = new Image();
|
||||
const orange_portal = new Image();
|
||||
const blue_portal = new Image();
|
||||
imgPlayer.src = "./assets/body.png";
|
||||
|
@ -23,10 +28,15 @@ map0_night.src = "./assets/map/map_principale_nuit.png"
|
|||
map1.src = "./assets/map/map1.png";
|
||||
map2.src = "./assets/map/map2.png";
|
||||
map3.src = "./assets/map/map3.png";
|
||||
map4.src = "./assets/map/map4.png";
|
||||
map5.src = "./assets/map/map5.jpg";
|
||||
map6.src = "./assets/map/map6.jpg";
|
||||
map7.src = "./assets/map/map7.jpg";
|
||||
map8.src = "./assets/map/map8.jpg";
|
||||
orange_portal.src = "./assets/orange_portal.webp";
|
||||
blue_portal.src = "./assets/blue_portal.webp";
|
||||
|
||||
const mapImages = [map0,map1,map2,map3];
|
||||
const mapImages = [map0,map1,map2,map3, map4, map5, map6, map7, map8];
|
||||
|
||||
class Render {
|
||||
constructor(idCanvas) {
|
||||
|
@ -121,7 +131,7 @@ class Render {
|
|||
}
|
||||
else
|
||||
{
|
||||
background=mapImages[Math.min(player.z,3)];
|
||||
background=mapImages[Math.min(player.z,8)];
|
||||
}
|
||||
|
||||
let mapWidth = background.width;
|
||||
|
|
Loading…
Reference in a new issue