Sprite rajzolás fix

This commit is contained in:
markojozsef
2026-10-18 14:33:03 +02:00
parent 17c34317e0
commit fde022f626

View File

@@ -360,7 +360,8 @@ def pick_sprite_id(c, ids):
def draw_tex(tex, cx, cy): def draw_tex(tex, cx, cy):
arcade.draw_texture_rect(tex, arcade.LRBT( arcade.draw_texture_rect(tex, arcade.LRBT(
cx - tex.width / 2, cx + tex.width / 2, cx - tex.width / 2, cx + tex.width / 2,
cy - tex.height / 2, cy + tex.height / 2)) cy - tex.height / 2, cy + tex.height / 2),
pixelated=True)
def draw_battlers(combatants, sprite_table, pos_func): def draw_battlers(combatants, sprite_table, pos_func):
for i, c in enumerate(combatants): for i, c in enumerate(combatants):
@@ -372,6 +373,7 @@ def draw(game):
arcade.draw_texture_rect( arcade.draw_texture_rect(
background, background,
arcade.LBWH(0, 0, game.screen_width, game.screen_height), arcade.LBWH(0, 0, game.screen_width, game.screen_height),
pixelated=True
) )
draw_battlers(enemies, enemy_sprites, enemy_pos) draw_battlers(enemies, enemy_sprites, enemy_pos)
draw_battlers(party_members, party_sprites, party_pos) draw_battlers(party_members, party_sprites, party_pos)