import pandas as pd import json # 读取Excel文件中的视觉配置 df = pd.read_excel('d:/CocosGame/Pong/assets/resources/data/excel/方块武器配置/方块武器配置表.xlsx', sheet_name='视觉配置') print("Excel视觉配置数据:") print(df[['武器ID', '拖尾特效']].head()) # 读取当前的weapons.json文件 with open('d:/CocosGame/Pong/assets/resources/data/weapons.json', 'r', encoding='utf-8') as f: weapons_data = json.load(f) print("\nweapons.json中的visualConfig示例:") for weapon in weapons_data['weapons'][:3]: print(f"武器ID: {weapon['id']}") if 'visualConfig' in weapon: print(f" visualConfig: {weapon['visualConfig']}") else: print(" 没有visualConfig字段") print()