diff --git a/public/exports/maps/map_extended_campus.png b/public/exports/maps/map_extended_campus.png new file mode 100644 index 00000000..4bae620e Binary files /dev/null and b/public/exports/maps/map_extended_campus.png differ diff --git a/public/maps/map_city.json b/public/maps/map_city.json index 4bc2d504..340b3ebc 100644 --- a/public/maps/map_city.json +++ b/public/maps/map_city.json @@ -1985,6 +1985,18 @@ "width":0, "x":167.549668874172, "y":99.3377483443709 + }, + { + "height":0, + "id":476, + "name":"spawn_extended_campus", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":928, + "y":560 }], "opacity":1, "properties":[ @@ -1994,7 +2006,7 @@ "value":false }], "type":"objectgroup", - "visible":true, + "visible":false, "x":0, "y":0 }, @@ -3669,7 +3681,7 @@ "value":true }], "type":"objectgroup", - "visible":true, + "visible":false, "x":0, "y":0 }, @@ -3827,6 +3839,17 @@ "width":16, "x":160, "y":66 + }, + { + "height":64, + "id":475, + "name":"enter_map_extended_campus", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":944, + "y":544 }], "opacity":1, "properties":[ @@ -3841,12 +3864,12 @@ "value":false }], "type":"objectgroup", - "visible":true, + "visible":false, "x":0, "y":0 }], "nextlayerid":49, - "nextobjectid":475, + "nextobjectid":477, "orientation":"orthogonal", "renderorder":"right-down", "tiledversion":"1.11.0", diff --git a/public/maps/map_extended_campus.json b/public/maps/map_extended_campus.json new file mode 100644 index 00000000..2e7ad823 --- /dev/null +++ b/public/maps/map_extended_campus.json @@ -0,0 +1,913 @@ +{ "compressionlevel":-1, + "height":20, + "infinite":false, + "layers":[ + { + "data":[927, 927, 927, 928, 748, 1005, 748, 889, 889, 889, 889, 889, 890, 748, 889, 889, 889, 889, 889, 889, + 889, 889, 890, 965, 748, 935, 748, 889, 889, 889, 889, 889, 890, 748, 889, 889, 889, 889, 889, 889, + 889, 889, 890, 965, 748, 935, 748, 889, 889, 889, 889, 889, 890, 748, 889, 889, 889, 889, 889, 889, + 889, 889, 890, 965, 748, 935, 748, 889, 889, 889, 889, 889, 890, 748, 889, 889, 889, 889, 889, 889, + 889, 889, 890, 965, 748, 935, 748, 748, 748, 748, 748, 748, 748, 748, 889, 889, 889, 889, 889, 889, + 889, 889, 890, 965, 748, 963, 927, 927, 928, 748, 748, 926, 927, 928, 889, 889, 889, 889, 889, 889, + 889, 889, 890, 965, 748, 963, 889, 889, 965, 748, 748, 963, 889, 965, 889, 889, 881, 882, 889, 889, + 889, 889, 890, 965, 748, 963, 889, 889, 1002, 748, 748, 1000, 889, 965, 889, 889, 889, 889, 889, 889, + 889, 889, 889, 965, 748, 1000, 1001, 1002, 710, 748, 748, 748, 1000, 1002, 889, 889, 889, 889, 889, 889, + 889, 889, 889, 965, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, + 889, 889, 889, 965, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, + 889, 889, 889, 965, 748, 926, 927, 928, 748, 748, 748, 748, 926, 927, 927, 927, 927, 927, 927, 928, + 889, 889, 889, 965, 748, 963, 889, 965, 748, 926, 928, 748, 963, 889, 889, 889, 889, 889, 889, 965, + 1001, 1001, 1001, 1002, 748, 963, 889, 965, 748, 963, 965, 748, 963, 889, 889, 889, 889, 889, 889, 965, + 748, 748, 748, 748, 748, 963, 889, 1002, 748, 963, 965, 748, 1000, 889, 889, 889, 889, 889, 889, 965, + 927, 927, 927, 928, 748, 963, 965, 748, 748, 963, 965, 748, 748, 963, 889, 889, 889, 889, 889, 965, + 889, 889, 889, 965, 748, 963, 965, 748, 926, 889, 889, 928, 748, 963, 889, 889, 889, 889, 889, 965, + 889, 889, 889, 965, 748, 963, 965, 748, 963, 889, 889, 965, 748, 963, 889, 889, 889, 889, 889, 965, + 889, 889, 889, 965, 748, 963, 965, 748, 963, 889, 889, 965, 748, 963, 889, 889, 889, 889, 889, 965, + 889, 889, 889, 1002, 748, 1000, 1002, 748, 1000, 1001, 1001, 1002, 748, 1000, 1001, 1001, 1001, 1001, 1001, 1002], + "height":20, + "id":1, + "name":"ground", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":20, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 354, 354, 354, 355, + 0, 0, 0, 0, 0, 0, 0, 0, 1037, 1038, 1039, 1040, 0, 0, 353, 354, 354, 354, 354, 355, + 0, 0, 0, 0, 0, 0, 0, 0, 1041, 1042, 1043, 1044, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1045, 1046, 1047, 1048, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1049, 1050, 1051, 1052, 517, 0, 514, 0, 0, 517, 0, 514, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 515, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 516, 0, 514, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 515, 0, 513, 0, 0, 0, 0, 0, + 574, 0, 0, 535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, 0, 0, + 0, 0, 0, 572, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 518, 0, 0, 0, 0, + 0, 0, 404, 609, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 518, + 514, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 517, 0, 0, 0, 514, 0, 0, + 1436, 1436, 1436, 1437, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 515, 0, 515, 0, 0, 516], + "height":20, + "id":2, + "name":"props", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":20, + "x":0, + "y":0 + }, + { + "data":[1368, 1369, 1369, 1370, 0, 1285, 0, 1188, 1189, 1190, 1196, 1197, 1198, 0, 1196, 1197, 1197, 1197, 1197, 1198, + 1395, 1396, 1396, 1397, 0, 1312, 0, 1178, 1179, 1180, 1070, 1071, 1072, 0, 195, 196, 196, 196, 196, 197, + 1422, 1423, 1423, 1424, 0, 0, 0, 1232, 1233, 1234, 1124, 1125, 1126, 0, 195, 196, 196, 196, 196, 197, + 0, 0, 0, 1303, 0, 0, 0, 1259, 1260, 1261, 1151, 1152, 1153, 0, 195, 196, 196, 196, 196, 197, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 196, 196, 196, 196, 197, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 269, 270, 270, 270, 270, 271, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 307, 307, 307, 307, 308, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 175, 176, 176, 177, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 212, 1860, 1860, 214, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 212, 1860, 1860, 214, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 249, 250, 250, 251, 0, 0, 0, 0, 0, 0, 0, 0], + "height":20, + "id":3, + "name":"buildings", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":20, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":6, + "name":"buildingDecorations", + "objects":[ + { + "gid":1336, + "height":16, + "id":1, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":-8, + "y":224 + }, + { + "gid":547, + "height":16, + "id":2, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":0, + "y":160 + }, + { + "gid":1336, + "height":16, + "id":3, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":128, + "y":64 + }, + { + "gid":1336, + "height":16, + "id":4, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":176, + "y":64 + }, + { + "gid":882, + "height":16, + "id":11, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":272, + "y":112 + }, + { + "gid":2147484530, + "height":16, + "id":12, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":256, + "y":112 + }, + { + "gid":620, + "height":16, + "id":13, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":248, + "y":44 + }, + { + "gid":620, + "height":16, + "id":14, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":280, + "y":44 + }, + { + "gid":1539, + "height":16, + "id":15, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":264, + "y":72 + }, + { + "gid":182, + "height":16, + "id":16, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":304, + "y":112 + }, + { + "gid":180, + "height":16, + "id":17, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":288, + "y":112 + }, + { + "gid":217, + "height":16, + "id":18, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":224, + "y":112 + }, + { + "gid":219, + "height":16, + "id":19, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":240, + "y":112 + }, + { + "gid":331, + "height":16, + "id":20, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":240, + "y":80 + }, + { + "gid":294, + "height":16, + "id":21, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":240, + "y":64 + }, + { + "gid":332, + "height":16, + "id":22, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":288, + "y":80 + }, + { + "gid":333, + "height":16, + "id":23, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":304, + "y":80 + }, + { + "gid":619, + "height":16, + "id":24, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":168, + "y":44 + }, + { + "gid":619, + "height":16, + "id":25, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":120, + "y":44 + }, + { + "gid":3221225685, + "height":16, + "id":26, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":160, + "y":304 + }, + + { + "gid":1073742037, + "height":16, + "id":27, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":144, + "y":304 + }, + { + "gid":213, + "height":16, + "id":28, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":144, + "y":288 + }, + { + "gid":2147483861, + "height":16, + "id":29, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":160, + "y":288 + }, + { + "gid":252, + "height":16, + "id":30, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":152, + "y":296 + }, + { + "gid":2207, + "height":16, + "id":31, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":104, + "y":216 + }, + { + "gid":2206, + "height":16, + "id":32, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":88, + "y":216 + }, + { + "gid":2190, + "height":16, + "id":33, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":88, + "y":200 + }, + { + "gid":2191, + "height":16, + "id":34, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":104, + "y":200 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":7, + "name":"map_boundaries", + "objects":[ + { + "height":208, + "id":36, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":312, + "y":112 + }, + { + "height":8, + "id":37, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":320, + "x":0, + "y":312 + }, + { + "height":320, + "id":38, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":8, + "x":0, + "y":0 + }, + { + "height":8, + "id":39, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":320, + "x":0, + "y":0 + }], + "opacity":1, + "properties":[ + { + "name":"isStatic", + "type":"bool", + "value":true + }], + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":12, + "name":"building_boundaries", + "objects":[ + { + "height":104, + "id":40, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":96, + "x":224, + "y":0 + }, + { + "height":56, + "id":42, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":96, + "x":112, + "y":0 + }, + { + "height":32, + "id":43, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":80, + "y":0 + }, + { + "height":48, + "id":44, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":64, + "x":0, + "y":0 + }, + { + "height":80, + "id":45, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":0, + "y":144 + }, + { + "height":16, + "id":46, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":96, + "y":192 + }, + { + "height":32, + "id":47, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":32, + "y":272 + }, + { + "height":16, + "id":48, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":0, + "y":288 + }, + { + "height":60, + "id":49, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":130, + "y":258 + }], + "opacity":1, + "properties":[ + { + "name":"isStatic", + "type":"bool", + "value":true + }], + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":8, + "name":"enter_new_map_boundaries", + "objects":[ + { + "height":64, + "id":50, + "name":"enter_map_city", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":0, + "y":224 + }, + { + "height":16, + "id":51, + "name":"enter_map_orange_house", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":128, + "y":48 + }, + { + "height":16, + "id":52, + "name":"enter_map_red_house", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":176, + "y":48 + }, + { + "height":16, + "id":53, + "name":"enter_map_realtor_office", + "rotation":0, + "type":"", + "visible":true, + "width":32, + "x":256, + "y":96 + }, + { + "height":16, + "id":65, + "name":"enter_map_city_top", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":64, + "y":0 + }, + { + "height":16, + "id":66, + "name":"enter_map_city_top", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":96, + "y":0 + }, + { + "height":16, + "id":67, + "name":"enter_map_city_top", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":208, + "y":0 + }], + "opacity":1, + "properties":[ + { + "name":"isStatic", + "type":"bool", + "value":false + }], + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":9, + "name":"spawnpoints", + "objects":[ + { + "height":0, + "id":54, + "name":"player", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":32, + "y":232 + }, + { + "height":0, + "id":55, + "name":"spawn_left", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":40, + "y":232 + }, + { + "height":0, + "id":56, + "name":"spawn_realtor_office", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":272, + "y":128 + }, + { + "height":0, + "id":57, + "name":"spawn_orange_house", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":136, + "y":80 + }, + { + "height":0, + "id":58, + "name":"spawn_red_house", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":184, + "y":80 + }, + { + "height":0, + "id":68, + "name":"spawn_extended_campus_top", + "point":true, + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":72, + "y":48 + }], + "opacity":1, + "properties":[ + { + "name":"isStatic", + "type":"bool", + "value":false + }], + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":10, + "name":"interaction_objects", + "objects":[ + { + "height":16, + "id":60, + "name":"tree_sign", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":48, + "y":48 + }, + { + "height":36, + "id":61, + "name":"campus_tree", + "rotation":0, + "type":"", + "visible":true, + "width":36, + "x":86, + "y":182 + }, + { + "height":60, + "id":62, + "name":"fountain", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":130, + "y":258 + }, + { + "height":16, + "id":63, + "name":"sign_left", + "rotation":0, + "type":"", + "visible":true, + "width":32, + "x":224, + "y":96 + }, + { + "height":16, + "id":64, + "name":"sign_right", + "rotation":0, + "type":"", + "visible":true, + "width":32, + "x":288, + "y":96 + }], + "opacity":1, + "properties":[ + { + "name":"isStatic", + "type":"bool", + "value":true + }], + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }], + "nextlayerid":13, + "nextobjectid":69, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.11.0", + "tileheight":16, + "tilesets":[ + { + "firstgid":1, + "source":"..\/..\/..\/..\/..\/Tiled\/tilesets\/map_city.tsx" + }, + { + "firstgid":1037, + "source":"..\/..\/..\/..\/..\/Tiled\/maps\/ztm_logo_64x64.tsx" + }, + { + "firstgid":1053, + "source":"..\/..\/..\/..\/..\/Tiled\/tilesets\/city_tiles.tsx" + }, + { + "firstgid":1539, + "source":"..\/..\/..\/..\/..\/Tiled\/maps\/ztm_logo.tsx" + }, + { + "firstgid":1540, + "source":"..\/..\/..\/..\/..\/Tiled\/tilesets\/map_city_dungeon.tsx" + }, + { + "firstgid":2062, + "source":"..\/..\/..\/..\/..\/Tiled\/forest_tiles.tsx" + }], + "tilewidth":16, + "type":"map", + "version":"1.10", + "width":20 +} \ No newline at end of file diff --git a/src/core/kaplay/sounds/index.js b/src/core/kaplay/sounds/index.js index 2457dad4..ca85228b 100644 --- a/src/core/kaplay/sounds/index.js +++ b/src/core/kaplay/sounds/index.js @@ -1,3 +1,4 @@ export const addSceneSounds = (sounds, k, map) => { + if (sounds === undefined) return; sounds.forEach((triggerSound) => triggerSound(k, map)); }; diff --git a/src/gameObjects/map_extended_campus/index.js b/src/gameObjects/map_extended_campus/index.js new file mode 100644 index 00000000..9e5525bd --- /dev/null +++ b/src/gameObjects/map_extended_campus/index.js @@ -0,0 +1,3 @@ +const gameObjects = []; + +export default gameObjects; diff --git a/src/interactions/map_city/enterMapExtendCampusTop.interactions.js b/src/interactions/map_city/enterMapExtendCampusTop.interactions.js new file mode 100644 index 00000000..3fde0927 --- /dev/null +++ b/src/interactions/map_city/enterMapExtendCampusTop.interactions.js @@ -0,0 +1,5 @@ +export const enterMapExtendedCampusTop = (player, k) => { + player.onCollide('enter_map_right', () => { + k.go('extended_campus', 'spawn_extended_campus_top'); + }); +}; diff --git a/src/interactions/map_city/enterMapExtendedCampus.interactions.js b/src/interactions/map_city/enterMapExtendedCampus.interactions.js new file mode 100644 index 00000000..2124e558 --- /dev/null +++ b/src/interactions/map_city/enterMapExtendedCampus.interactions.js @@ -0,0 +1,5 @@ +export const enterMapExtendedCampus = (player, k) => { + player.onCollide('enter_map_extended_campus', () => { + k.go('extended_campus'); + }); +}; diff --git a/src/interactions/map_city/index.js b/src/interactions/map_city/index.js index 342bb881..2891c206 100644 --- a/src/interactions/map_city/index.js +++ b/src/interactions/map_city/index.js @@ -13,6 +13,8 @@ import { import { stall1Interaction, stall2Interaction } from './stalls.interaction'; import { enterMapClassroomInteraction } from './enterMapClassroomInteraction.interactions'; import { enterMapSeasideInteraction } from './enterMapSeasideInteraction.interactions'; +import { enterMapExtendedCampus } from './enterMapExtendedCampus.interactions'; +import { enterMapExtendedCampusTop } from './enterMapExtendCampusTop.interactions'; const interactions = [ enterMapArcadeInteraction, @@ -21,6 +23,8 @@ const interactions = [ enterMapForestJunctionInteraction, enterMapClassroomInteraction, enterMapSeasideInteraction, + enterMapExtendedCampus, + enterMapExtendedCampusTop, boundaryBurgerBarInteraction, boundaryArcadeInteraction, snackBarRedInteraction, diff --git a/src/interactions/map_extended_campus/campusTreeInteraction.interactions.js b/src/interactions/map_extended_campus/campusTreeInteraction.interactions.js new file mode 100644 index 00000000..cb29f170 --- /dev/null +++ b/src/interactions/map_extended_campus/campusTreeInteraction.interactions.js @@ -0,0 +1,14 @@ +import { interactionHandler } from '../handler.interactions'; +import { displayDialogue } from '../../utils'; + +export const campusTreeInteraction = (player, k) => { + interactionHandler(player, 'campus_tree', k, async () => { + displayDialogue({ + k, + player, + text: [ + 'The tree seems to emit a faint glow. There are carvings on its trunk, suggesting that students from years past have left messages or markings here.', + ], + }); + }); +}; diff --git a/src/interactions/map_extended_campus/enterMapCityLeft.interactions.js b/src/interactions/map_extended_campus/enterMapCityLeft.interactions.js new file mode 100644 index 00000000..9370d4e1 --- /dev/null +++ b/src/interactions/map_extended_campus/enterMapCityLeft.interactions.js @@ -0,0 +1,5 @@ +export const enterMapCityLeft = (player, k) => { + player.onCollide('enter_map_city', () => { + k.go('city', 'spawn_extended_campus'); + }); +}; diff --git a/src/interactions/map_extended_campus/enterMapCityTop.interactions.js b/src/interactions/map_extended_campus/enterMapCityTop.interactions.js new file mode 100644 index 00000000..d577e81c --- /dev/null +++ b/src/interactions/map_extended_campus/enterMapCityTop.interactions.js @@ -0,0 +1,5 @@ +export const enterMapCityTop = (player, k) => { + player.onCollide('enter_map_city_top', () => { + k.go('city', 'spawn_right'); + }); +}; diff --git a/src/interactions/map_extended_campus/fountainInteraction.interactions.js b/src/interactions/map_extended_campus/fountainInteraction.interactions.js new file mode 100644 index 00000000..f3e25e45 --- /dev/null +++ b/src/interactions/map_extended_campus/fountainInteraction.interactions.js @@ -0,0 +1,14 @@ +import { interactionHandler } from '../handler.interactions'; +import { displayDialogue } from '../../utils'; + +export const fountainInteraction = (player, k) => { + interactionHandler(player, 'fountain', k, async () => { + displayDialogue({ + k, + player, + text: [ + 'The fountain\'s gentle flow seems to whisper, "May your journey be as calm as these waters."', + ], + }); + }); +}; diff --git a/src/interactions/map_extended_campus/index.js b/src/interactions/map_extended_campus/index.js new file mode 100644 index 00000000..16366c57 --- /dev/null +++ b/src/interactions/map_extended_campus/index.js @@ -0,0 +1,19 @@ +import { enterMapCityLeft } from './enterMapCityLeft.interactions'; +import { enterMapCityTop } from './enterMapCityTop.interactions'; +import { campusTreeInteraction } from './campusTreeInteraction.interactions'; +import { fountainInteraction } from './fountainInteraction.interactions'; +import { signLeftInteraction } from './signLeftInteraction.interactions'; +import { signRightInteraction } from './signRightInteraction.interactions'; +import { treeSignInteraction } from './treeSignInteraction.interactions'; + +const interactions = [ + enterMapCityLeft, + enterMapCityTop, + campusTreeInteraction, + fountainInteraction, + signLeftInteraction, + signRightInteraction, + treeSignInteraction, +]; + +export default interactions; diff --git a/src/interactions/map_extended_campus/signLeftInteraction.interactions.js b/src/interactions/map_extended_campus/signLeftInteraction.interactions.js new file mode 100644 index 00000000..b4bc1b64 --- /dev/null +++ b/src/interactions/map_extended_campus/signLeftInteraction.interactions.js @@ -0,0 +1,12 @@ +import { interactionHandler } from '../handler.interactions'; +import { displayDialogue } from '../../utils'; + +export const signLeftInteraction = (player, k) => { + interactionHandler(player, 'sign_left', k, async () => { + displayDialogue({ + k, + player, + text: ['"Finding your dream home, one step at a time."'], + }); + }); +}; diff --git a/src/interactions/map_extended_campus/signRightInteraction.interactions.js b/src/interactions/map_extended_campus/signRightInteraction.interactions.js new file mode 100644 index 00000000..2d5e879c --- /dev/null +++ b/src/interactions/map_extended_campus/signRightInteraction.interactions.js @@ -0,0 +1,14 @@ +import { interactionHandler } from '../handler.interactions'; +import { displayDialogue } from '../../utils'; + +export const signRightInteraction = (player, k) => { + interactionHandler(player, 'sign_right', k, async () => { + displayDialogue({ + k, + player, + text: [ + '"Your future awaits—let us help you find the perfect place to call home."', + ], + }); + }); +}; diff --git a/src/interactions/map_extended_campus/treeSignInteraction.interactions.js b/src/interactions/map_extended_campus/treeSignInteraction.interactions.js new file mode 100644 index 00000000..78e65cba --- /dev/null +++ b/src/interactions/map_extended_campus/treeSignInteraction.interactions.js @@ -0,0 +1,15 @@ +import { interactionHandler } from '../handler.interactions'; +import { displayDialogue } from '../../utils'; + +export const treeSignInteraction = (player, k) => { + interactionHandler(player, 'tree_sign', k, async () => { + displayDialogue({ + k, + player, + text: [ + 'These trees were planted by students, each one a symbol of growth, resilience, and hope for the future.', + 'May they stand tall and strong, shading those who come after.', + ], + }); + }); +}; diff --git a/src/main.js b/src/main.js index d5689c71..e434376c 100644 --- a/src/main.js +++ b/src/main.js @@ -20,6 +20,7 @@ import { loseScreen } from './scenes/gameMachine/lose'; import { classroom } from './scenes/classroom'; import { seaside } from './scenes/seaside'; import { downtown } from './scenes/downtown'; +import { extendedCampus } from './scenes/extended_campus'; k.scene('start', (enter_tag) => bootstrap(start, { enter_tag })); k.scene('city', (enter_tag) => bootstrap(city, { enter_tag })); @@ -34,6 +35,9 @@ k.scene('campus_house_1', (enter_tag) => k.scene('classroom', (enter_tag) => bootstrap(classroom, { enter_tag })); k.scene('seaside', (enter_tag) => bootstrap(seaside, { enter_tag })); k.scene('downtown', (enter_tag) => bootstrap(downtown, { enter_tag })); +k.scene('extended_campus', (enter_tag) => + bootstrap(extendedCampus, { enter_tag }) +); k.scene('fishing', (enter_tag) => miniGameBootstrap(fishing, { enter_tag })); // Game Machine Scenes diff --git a/src/scenes/extended_campus.js b/src/scenes/extended_campus.js new file mode 100644 index 00000000..6293e3b9 --- /dev/null +++ b/src/scenes/extended_campus.js @@ -0,0 +1,22 @@ +import gameObjects from '../gameObjects/map_extended_campus'; +import { initMap } from '../init/map.init'; +import interactions from '../interactions/map_extended_campus'; + +export async function extendedCampus() { + const objectConfig = { + static: [ + 'map_boundaries', + 'building_boundaries', + 'enter_new_map_boundaries', + ], + spawnpoints: ['spawnpoints'], + interactionObjects: ['interaction_objects'], + }; + const [map, spawnpoint] = await initMap( + objectConfig, + './exports/maps/map_extended_campus.png', + './maps/map_extended_campus.json' + ); + + return [map, spawnpoint, gameObjects, interactions]; +}