From a11f8613e1c6221a960bd4a01e0c6289959550ef Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Thu, 20 Apr 2023 20:30:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E7=94=BB=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/battle/cell/grid_cell.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/app/ui/battle/cell/grid_cell.lua b/lua/app/ui/battle/cell/grid_cell.lua index fcc1bc56..6876b7d6 100644 --- a/lua/app/ui/battle/cell/grid_cell.lua +++ b/lua/app/ui/battle/cell/grid_cell.lua @@ -140,8 +140,6 @@ end function GridCell:resetTranform() local uiMap = self:getUIMap() - uiMap["grid_cell.touch_node"]:setAnchoredPosition(0, 0) - uiMap["grid_cell.touch_node"]:setLocalScale(1, 1, 1) uiMap["grid_cell.touch_node.ani_node"]:setAnchoredPosition(0, 0) uiMap["grid_cell.touch_node.ani_node"]:setLocalScale(1, 1, 1) end @@ -149,7 +147,7 @@ end function GridCell:showAni() local uiMap = self:getUIMap() if not self.aniComp then - self.aniComp = uiMap["grid_cell.touch_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR) + self.aniComp = uiMap["grid_cell.touch_node.ani_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR) end -- CS.UnityEngine.Animator.StringToHash("idle") 结果是-601574123 self.aniComp.enabled = true @@ -159,7 +157,7 @@ end function GridCell:hideAni() local uiMap = self:getUIMap() if not self.aniComp then - self.aniComp = uiMap["grid_cell.touch_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR) + self.aniComp = uiMap["grid_cell.touch_node.ani_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR) end self.aniComp.enabled = false self:resetTranform()