improvement: get shoot map data from its zone file

This commit is contained in:
Kazhnuz 2019-12-28 13:25:45 +01:00
parent c35fcb7c5c
commit 00097ac5d9
2 changed files with 3 additions and 8 deletions

View file

@ -1,44 +1,37 @@
return {
["forest"] = {
name = "Jade Forest",
borders = 0,
tiles = 0,
background = "forest"
},
["city"] ={
name = "Diamond Highway",
borders = 1,
tiles = 1,
background = "city"
},
["tunnel"] ={
name = "Peridot Tunnel",
borders = 2,
tiles = 2,
background = "tunnel",
music = nil
},
["mountain"] ={
name = "Pearl Mountain",
borders = 3,
tiles = 3,
background = "mountain"
},
["hills"] ={
name = "Calcite Hills",
borders = 4,
tiles = 4,
background = "hills"
},
["bridge"] ={
name = "Carnelian Bridge",
borders = 5,
tiles = 5,
background = "bridge"
},
["castle"] ={
name = "Ametist Castle",
borders = 6,
tiles = 6,
background = "castle",
music = nil

View file

@ -10,7 +10,9 @@ function ShootMap:new(world, maptype, mapname)
ShootMap.super.new(self, world)
self:setPadding(0, 0, 0, 0)
self:generateTextures(5, mapname)
self.textureId = zoneDatas[mapname].tiles
self.background = zoneDatas[mapname].background
self:generateTextures(self.textureId, self.background)
end
function ShootMap:loadCollisions()