Merge branch 'isometric' of https://git.tavres.ru/laktionov-as/arcade into isometric

This commit is contained in:
2026-05-29 17:34:26 +03:00
+5 -5
View File
@@ -45,7 +45,7 @@ def to_iso(tile_list):
col = tile.center_x//TILE_WIDTH
row = tile.center_y//TILE_HEIGHT
tile.center_x = tile.center_x - TILE_WIDTH//2 * (col-row)
tile.center_y = tile.center_y - TILE_HEIGHT//2 * (row+col)
tile.center_y = tile.center_y - TILE_HEIGHT//2 * (col+row)
return tile_list
class Player(arcade.Sprite):
@@ -118,15 +118,15 @@ class MainView(arcade.View):
#self.enemys.update(delta_time)
def on_mouse_press(self,x,y,but,mod):
world_point = self.camera.unproject((x,y))
tile_col = world_point.x//TILE_WIDTH
tile_row = world_point.y//TILE_HEIGHT
tile_col = world_point.x/TILE_WIDTH
tile_row = world_point.y/TILE_HEIGHT
sheet = arcade.load_spritesheet('./assets/tiles/64x64.png')
textures = sheet.get_texture_grid((64,64),16,184)
self.walls.append(
arcade.Sprite(
textures[165],
center_x=tile_col*TILE_WIDTH + TILE_WIDTH//2,
center_y=tile_row*TILE_HEIGHT+TILE_HEIGHT
center_x=world_point.x - world_point.x%(TILE_WIDTH//2),
center_y=world_point.y - world_point.y%(TILE_HEIGHT//2)
)
)
def on_key_press(self,key,mod):