Diagonal pathfinding and moving works great! Fixed teleport bug and terrain overlay.
This commit is contained in:
@@ -78,15 +78,13 @@ class Creature(Object):
|
||||
return
|
||||
|
||||
# ★ ТОЛЬКО интерполяция offset ★
|
||||
start_row, start_col = self.start_pos or (0, 0)
|
||||
start_row, start_col = self.start_pos #or (0, 0)
|
||||
target_row, target_col = self.current_target
|
||||
offset_x = (target_col - start_col) * cell_size * self.move_progress
|
||||
offset_y = (target_row - start_row) * cell_size * self.move_progress
|
||||
self.render_offset = (offset_x, offset_y)
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass
|
||||
class Item(Object):
|
||||
# passive_abilities = {}
|
||||
|
||||
Reference in New Issue
Block a user