Csata szobor grafika
This commit is contained in:
BIN
res/sprite/podium.png
Normal file
BIN
res/sprite/podium.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 182 B |
@@ -8,6 +8,7 @@ sprites = {
|
|||||||
"cursor" : arcade.load_texture("res/sprite/handcursor.png"),
|
"cursor" : arcade.load_texture("res/sprite/handcursor.png"),
|
||||||
"font" : arcade.load_spritesheet("res/sprite/font.png"),
|
"font" : arcade.load_spritesheet("res/sprite/font.png"),
|
||||||
"panel" : arcade.load_spritesheet("res/sprite/panel.png"),
|
"panel" : arcade.load_spritesheet("res/sprite/panel.png"),
|
||||||
|
"podium" : arcade.load_spritesheet("res/sprite/podium.png"),
|
||||||
"balthasar": arcade.load_spritesheet("res/sprite/balthasar.png"),
|
"balthasar": arcade.load_spritesheet("res/sprite/balthasar.png"),
|
||||||
"overworld": arcade.load_spritesheet("res/sprite/overworld_sheet.png"),
|
"overworld": arcade.load_spritesheet("res/sprite/overworld_sheet.png"),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ balthasar = BalthasarRenderer()
|
|||||||
overworld = OverworldMap()
|
overworld = OverworldMap()
|
||||||
objects = [
|
objects = [
|
||||||
BattlePodium(0 , 0, 0),
|
BattlePodium(0 , 0, 0),
|
||||||
BattlePodium(48, 0, 1),
|
BattlePodium(96, 0, 1),
|
||||||
BattlePodium(0 ,48, 2),
|
BattlePodium(0 ,96, 2),
|
||||||
BattlePodium(48,48, 3),
|
BattlePodium(96,96, 3),
|
||||||
balthasar
|
balthasar
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -56,13 +56,17 @@ OVERWORLD_LB_X = 0
|
|||||||
OVERWORLD_LB_Y = 0
|
OVERWORLD_LB_Y = 0
|
||||||
OVERWORLD_TILE_WIDTH = 16
|
OVERWORLD_TILE_WIDTH = 16
|
||||||
OVERWORLD_TILE_HEIGHT = 16
|
OVERWORLD_TILE_HEIGHT = 16
|
||||||
OVERWORLD_WIDTH = 4
|
OVERWORLD_WIDTH = 8
|
||||||
OVERWORLD_HEIGHT = 4
|
OVERWORLD_HEIGHT = 8
|
||||||
OVERWORLD_MAP = [
|
OVERWORLD_MAP = [
|
||||||
[5,3,3,6],
|
[5,3,3,3,3,3,3,6],
|
||||||
[1,0,0,2],
|
[1,0,0,0,0,0,0,2],
|
||||||
[1,0,0,2],
|
[1,0,0,0,0,0,0,2],
|
||||||
[7,4,4,8],
|
[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:
|
class OverworldMap:
|
||||||
@@ -153,22 +157,27 @@ class OverworldMap:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Csata Szobor
|
# Csata Szobor
|
||||||
|
PODIUM_WIDTH = 48
|
||||||
|
PODIUM_HEIGHT = 32
|
||||||
|
|
||||||
class BattlePodium:
|
class BattlePodium:
|
||||||
def __init__(self, x, y, battle_id):
|
def __init__(self, x, y, battle_id):
|
||||||
self.x = x
|
self.x = x
|
||||||
self.y = y
|
self.y = y
|
||||||
self.w = 16
|
self.w = PODIUM_WIDTH
|
||||||
self.h = 16
|
self.h = PODIUM_HEIGHT
|
||||||
self.interactive = True
|
self.interactive = True
|
||||||
self.battle = battle_id
|
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):
|
def get_aabb(self):
|
||||||
return self.x, self.y, self.x + self.w, self.y + self.h
|
return self.x, self.y, self.x + self.w, self.y + self.h
|
||||||
|
|
||||||
def render(self, game, translation):
|
def render(self, game, translation):
|
||||||
arcade.draw_rect_filled(
|
arcade.draw_texture_rect(
|
||||||
arcade.LBWH(self.x, self.y, 16, 16).move(*translation),
|
self.texture,
|
||||||
arcade.color.PURPLE,
|
arcade.LBWH(self.x, self.y, self.w, self.h).move(*translation),
|
||||||
|
pixelated=True
|
||||||
)
|
)
|
||||||
|
|
||||||
def on_interact(self, start_battle_func):
|
def on_interact(self, start_battle_func):
|
||||||
|
|||||||
Reference in New Issue
Block a user