Csata szobor grafika

This commit is contained in:
markojozsef
2026-10-17 11:11:05 +02:00
parent 040acdcd4b
commit db760beb00
4 changed files with 25 additions and 15 deletions

View File

@@ -56,13 +56,17 @@ OVERWORLD_LB_X = 0
OVERWORLD_LB_Y = 0
OVERWORLD_TILE_WIDTH = 16
OVERWORLD_TILE_HEIGHT = 16
OVERWORLD_WIDTH = 4
OVERWORLD_HEIGHT = 4
OVERWORLD_WIDTH = 8
OVERWORLD_HEIGHT = 8
OVERWORLD_MAP = [
[5,3,3,6],
[1,0,0,2],
[1,0,0,2],
[7,4,4,8],
[5,3,3,3,3,3,3,6],
[1,0,0,0,0,0,0,2],
[1,0,0,0,0,0,0,2],
[1,0,0,0,0,0,0,2],
[1,0,0,0,0,0,0,2],
[1,0,0,0,0,0,0,2],
[1,0,0,0,0,0,0,2],
[7,4,4,4,4,4,4,8],
]
class OverworldMap:
@@ -153,22 +157,27 @@ class OverworldMap:
)
# Csata Szobor
PODIUM_WIDTH = 48
PODIUM_HEIGHT = 32
class BattlePodium:
def __init__(self, x, y, battle_id):
self.x = x
self.y = y
self.w = 16
self.h = 16
self.w = PODIUM_WIDTH
self.h = PODIUM_HEIGHT
self.interactive = True
self.battle = battle_id
self.texture = assets.sprites["podium"].get_texture(arcade.LBWH(battle_id * PODIUM_WIDTH, 0, PODIUM_WIDTH, PODIUM_HEIGHT))
def get_aabb(self):
return self.x, self.y, self.x + self.w, self.y + self.h
def render(self, game, translation):
arcade.draw_rect_filled(
arcade.LBWH(self.x, self.y, 16, 16).move(*translation),
arcade.color.PURPLE,
arcade.draw_texture_rect(
self.texture,
arcade.LBWH(self.x, self.y, self.w, self.h).move(*translation),
pixelated=True
)
def on_interact(self, start_battle_func):