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()