self.draw_save_button()
def _draw_tile(self, tile_pos, tile):
+ if tile_pos in self.nodes:
+ self.remove_widget(self.nodes[tile_pos])
node = Widget(size=(TILE_SIZE, TILE_SIZE), pos=tile_pos)
node.bind(on_touch_down=self.change_node)
node.bind(on_touch_move=self.change_node)
self.level_obj.set_tile_type(tile_pos, action)
for map_pos, new_tile in self.level_obj.get_changed_tiles():
node_pos = (map_pos[0] * TILE_SIZE, map_pos[1] * TILE_SIZE)
- old_node = self.nodes[node_pos]
- self.remove_widget(old_node)
self._draw_tile(node_pos, new_tile)