def process_ui(self): data = self.ui.data if data.mode == I_BROWSE: pass elif data.mode == I_MOVE: if data.dest: path = astar.path(self.map, data.selected.pos, data.dest) x,y = self.ui.data.selected.pos self.map.grid[x][y].move_path(path) elif data.mode == I_ATTACK: pass else: print "Unexpected Mode"
def process_ui(self): data = self.ui.data if data.mode == I_BROWSE: pass elif data.mode == I_MOVE: if data.dest: path = astar.path(self.map, data.selected.pos, data.dest) x, y = self.ui.data.selected.pos self.map.grid[x][y].move_path(path) elif data.mode == I_ATTACK: pass else: print "Unexpected Mode"
def move_character(self, e): pos = self.map.obj_list[e.name] path = astar.path(self.map, pos, e.dest) x,y = pos self.map.grid[x][y].move_path(path)
def move_character(self, e): pos = self.map.obj_list[e.name] path = astar.path(self.map, pos, e.dest) x, y = pos self.map.grid[x][y].move_path(path)