def place(self, x, y): res = Being.place(self, x, y) if not res: return if self.target_pos == None: self.target_pos = (self.x, self.y) if self.target_pos == (self.x, self.y): self.get_new_target() print "From %s to %s" % (str((self.x, self.y)), str(self.target_pos)) path_compute(self.path, self.x, self.y, *self.target_pos) self.path_index = 0 return res
def place(self, x, y): res = Being.place(self, x, y) if not res: return if self.target_pos == None: self.target_pos = (self.x, self.y) if self.target_pos == (self.x, self.y): self.get_new_target() print "From %s to %s" % (str( (self.x, self.y)), str(self.target_pos)) path_compute(self.path, self.x, self.y, *self.target_pos) self.path_index = 0 return res
def __init__(self, backend, config): Being.__init__(self, backend, config) self.path = path_new_using_map(backend.current_area.tcod_map) self.target_pos = None
def __init__(self, backend, config): Being.__init__(self, backend, config)
def place(self, x, y): res = Being.place(self, x, y) if res == True: self.compute_fov() return res