diff --git a/Assets/ManagedResources/~Lua/Modules/DemonSlayer/DemonSlayerNewPanel.lua b/Assets/ManagedResources/~Lua/Modules/DemonSlayer/DemonSlayerNewPanel.lua index 5816d64d19..5b1bccd331 100644 --- a/Assets/ManagedResources/~Lua/Modules/DemonSlayer/DemonSlayerNewPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/DemonSlayer/DemonSlayerNewPanel.lua @@ -116,15 +116,14 @@ function DemonSlayerNewPanel:SetPlayer() npcList[i]:OnOpen(GetPlayerRoleSingleConFig().Scale11,Vector3.New(0,-102.73,0),WALK_DIR.IDLE_FRONT) end - local PlayerRoleConFig = ConfigManager.GetConfigData(ConfigName.PlayerRole, curPlayerLiveViewData.ride) - local offset = Vector3.New(0, 0, 0) -- 获取向左时的偏移值 + local PlayerRoleConFig = ConfigManager.TryGetConfigData(ConfigName.PlayerRole, curPlayerLiveViewData.ride) if PlayerRoleConFig and PlayerRoleConFig.RideOffset and PlayerRoleConFig.RideOffset[3] then + local offset = Vector3.New(0, 0, 0) offset.x = PlayerRoleConFig.RideOffset[3][1] offset.y = PlayerRoleConFig.RideOffset[3][2] + npcList[i].transform.localPosition = Vector3.New(0, 122, 0) - offset * GetPlayerRoleSingleConFig().Scale11 end - npcList[i].transform.localPosition = Vector3.New(0, 122, 0) - offset * GetPlayerRoleSingleConFig().Scale11 - else image.enabled = true