From 3af117bc5350b5321133ad9f4d28f295c8f46ac5 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Wed, 10 Nov 2021 17:31:38 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=B8=89=E7=95=8C=E9=99=8D=E9=AD=94?= =?UTF-8?q?=E3=80=91=E4=BF=AE=E5=A4=8D=E6=B2=A1=E6=9C=89=E5=9D=90=E9=AA=91?= =?UTF-8?q?=E6=97=B6=E6=8A=A5=E9=94=99=E5=BE=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/DemonSlayer/DemonSlayerNewPanel.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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