修复坚果保龄球闪退bug
This commit is contained in:
parent
87d5d4a890
commit
d9a49ff1a1
@ -137,7 +137,7 @@ class Map():
|
|||||||
map_y * c.GRID_Y_SIZE + c.GRID_Y_SIZE//5 * 3 + c.MAP_OFFSET_Y)
|
map_y * c.GRID_Y_SIZE + c.GRID_Y_SIZE//5 * 3 + c.MAP_OFFSET_Y)
|
||||||
|
|
||||||
def setMapGridType(self, map_x, map_y, plot_type):
|
def setMapGridType(self, map_x, map_y, plot_type):
|
||||||
self.map[map_y][map_x] = plot_type
|
self.map[map_y][map_x][c.MAP_PLOT_TYPE] = plot_type
|
||||||
|
|
||||||
def addMapPlant(self, map_x, map_y, plantName, sleep=False):
|
def addMapPlant(self, map_x, map_y, plantName, sleep=False):
|
||||||
self.map[map_y][map_x][c.MAP_PLANT].add(plantName)
|
self.map[map_y][map_x][c.MAP_PLANT].add(plantName)
|
||||||
|
|||||||
@ -340,7 +340,7 @@ class Level(tool.State):
|
|||||||
def initBowlingMap(self):
|
def initBowlingMap(self):
|
||||||
for x in range(3, self.map.width):
|
for x in range(3, self.map.width):
|
||||||
for y in range(self.map.height):
|
for y in range(self.map.height):
|
||||||
self.map.setMapGridType(x, y, c.MAP_STATE_UNAVAILABLE) # 将坚果保龄球红线右侧设置为不可种植任何植物
|
self.map.setMapGridType(x, y, c.MAP_UNAVAILABLE) # 将坚果保龄球红线右侧设置为不可种植任何植物
|
||||||
|
|
||||||
def initState(self):
|
def initState(self):
|
||||||
if c.CHOOSEBAR_TYPE in self.map_data:
|
if c.CHOOSEBAR_TYPE in self.map_data:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user