主题更新为SiLu
This commit is contained in:
@@ -7,8 +7,8 @@ from pathlib import Path
|
||||
EXCEL_PATH = "found_方块.xlsx" # 根据你的实际文件名改
|
||||
|
||||
# 作为模板的 prefab(就是你贴出来那份,包含 Ground / Border / Grid)
|
||||
TEMPLATE_PREFAB = "Level90093.prefab" # 根据实际文件名改
|
||||
OLD_LEVEL_NAME = "Level90093" # 模板 prefab 中的旧关卡名
|
||||
TEMPLATE_PREFAB = "Level90116.prefab" # 根据实际文件名改
|
||||
OLD_LEVEL_NAME = "Level90116" # 模板 prefab 中的旧关卡名
|
||||
|
||||
|
||||
# 输出目录
|
||||
@@ -58,7 +58,7 @@ def generate_tiles_block(coords):
|
||||
for item in coords:
|
||||
if len(item) == 2:
|
||||
x, y = item
|
||||
tile_index = 0
|
||||
tile_index = 1
|
||||
sprite_index = 0
|
||||
else:
|
||||
x, y, tile_index, sprite_index = item
|
||||
@@ -157,7 +157,7 @@ def main():
|
||||
|
||||
# 2) 用当前地图的坐标替换 Ground 的 m_Tiles 区块
|
||||
# 构建 (x,y,tile_index,sprite_index) 列表,Ground 使用索引 0/0(和原模板一致)
|
||||
ground_tiles = [(int(x), int(y), 0, 0) for x, y in ground_coords]
|
||||
ground_tiles = [(int(x), int(y), 1, 0) for x, y in ground_coords]
|
||||
if ground_tiles:
|
||||
try:
|
||||
new_text = replace_tilemap_by_gameobject_name(new_text, "Ground", ground_tiles)
|
||||
@@ -170,15 +170,15 @@ def main():
|
||||
# water -> m_TileIndex:2, m_TileSpriteIndex:2
|
||||
if water_df is not None:
|
||||
wg = water_df[water_df['map'] == map_no]
|
||||
border_tiles += [(int(x), int(y), 0, 0) for x, y in zip(wg['x'], wg['y'])]
|
||||
border_tiles += [(int(x), int(y), 5, 3) for x, y in zip(wg['x'], wg['y'])]
|
||||
# wall -> m_TileIndex:0, m_TileSpriteIndex:0
|
||||
if wall_df is not None:
|
||||
wg = wall_df[wall_df['map'] == map_no]
|
||||
border_tiles += [(int(x), int(y), 2, 2) for x, y in zip(wg['x'], wg['y'])]
|
||||
border_tiles += [(int(x), int(y), 4, 2) for x, y in zip(wg['x'], wg['y'])]
|
||||
# jump -> m_TileIndex:1, m_TileSpriteIndex:1
|
||||
if jump_df is not None:
|
||||
wg = jump_df[jump_df['map'] == map_no]
|
||||
border_tiles += [(int(x), int(y), 1, 1) for x, y in zip(wg['x'], wg['y'])]
|
||||
border_tiles += [(int(x), int(y), 3, 1) for x, y in zip(wg['x'], wg['y'])]
|
||||
|
||||
if border_tiles:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user