diff --git a/css/main.css b/css/main.css index 1e387c2..983c2e4 100644 --- a/css/main.css +++ b/css/main.css @@ -4,6 +4,16 @@ position: absolute; } +.spriteUtils{ + position: absolute; +} + +.flower{ + width: 32px; + height: 32px; + background: url(../img/objectlayer.png) 125px -29px;; +} + .water { background: url(../img/ground_tiles.png) 192px 254px; } diff --git a/img/Extra_Unfinished4.png b/img/Extra_Unfinished4.png new file mode 100644 index 0000000..962b8b8 Binary files /dev/null and b/img/Extra_Unfinished4.png differ diff --git a/img/objectlayer.png b/img/objectlayer.png new file mode 100644 index 0000000..599c476 Binary files /dev/null and b/img/objectlayer.png differ diff --git a/js/main.js b/js/main.js index 64d5154..5b53467 100644 --- a/js/main.js +++ b/js/main.js @@ -6,8 +6,10 @@ socket.on('connect', function () { socket.emit("getmap", 100, 100); }); -socket.on('getmap', function (map) { - console.log(map); +socket.on('getmap', function (conent) { + var map = conent["map"]; + var utilMap = conent["utilMap"]; + //console.log(map); var domMap = $("#map"); domMap.empty(); @@ -164,7 +166,16 @@ socket.on('getmap', function (map) { else if(map[w][h-1]=="5" && map[w][h]=="5" && map[w-1][h]=="5") spClass = "rightLeftB_5"; - domMap.append(''); + domMap.append(''); + } + } + + for(var w=0;w'); + } } } }); \ No newline at end of file diff --git a/s_map.js b/s_map.js index 5bdaab7..b8442b6 100644 --- a/s_map.js +++ b/s_map.js @@ -1,6 +1,7 @@ module.exports = { generateMap: function(width, height) { var map = []; + var utilMap = []; var i = 0; map[i++] = ["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]; map[i++] = ["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]; @@ -44,10 +45,11 @@ module.exports = { for(var w=0;w