Beispiel #1
0
 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
Beispiel #2
0
    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
Beispiel #3
0
 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
Beispiel #4
0
 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
Beispiel #5
0
 def __init__(self, backend, config):
     Being.__init__(self, backend, config)
Beispiel #6
0
 def place(self, x, y):
     res = Being.place(self, x, y)
     if res == True:
         self.compute_fov()
     return res
Beispiel #7
0
 def __init__(self, backend, config):
     Being.__init__(self, backend, config)
Beispiel #8
0
 def place(self, x, y):
     res = Being.place(self, x, y)
     if res == True:
         self.compute_fov()
     return res