Diagonal pathfinding and moving works great! Fixed teleport bug and terrain overlay.

This commit is contained in:
shiva404
2026-02-20 04:53:33 +03:00
parent 7fbc1b38c2
commit 2b114ddd2d
7 changed files with 199 additions and 37 deletions

View File

@@ -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 = {}