-- 这里是实现控件的闪烁,不能将一个局部的动作变量,赋给两个控件来动作,只能一个控件对应一个动作 function UIBagController:ShowEffect( ) local tGoodList = ItemM:GetTGoods(); local tBoxList = ItemM:getBoxForOpen(); for i=1,#tBoxList do for j=1,#tGoodList do if tBoxList[i].id == tGoodList[j].id then print("=======tGoodList[j].pos=========" .. tGoodList[j].pos); local gridName = string.format("ImageView_Grid%d", tGoodList[j].pos); local imageViewGrid = tolua.cast(UIHelper:seekWidgetByName(self.panelCenter, gridName), "ImageView"); local labelItemName = tolua.cast(UIHelper:seekWidgetByName(imageViewGrid, "Label_ItemName"), "Label"); local labelItenNum = tolua.cast(UIHelper:seekWidgetByName(imageViewGrid, "Label_ItenNum"), "Label"); local action = Transition.sequence({ CCFadeOut:create(0.5), CCFadeIn:create(0.5), CCFadeOut:create(0.5), CCFadeIn:create(0.5), }) labelItenNum:runAction(action); end end end self.lebCoin:runAction(Transition.sequence({ CCFadeOut:create(0.5), CCFadeIn:create(0.5), CCFadeOut:create(0.5), CCFadeIn:create(0.5), })); self.lebGold:runAction(Transition.sequence({ CCFadeOut:create(0.5), CCFadeIn:create(0.5), CCFadeOut:create(0.5), CCFadeIn:create(0.5), })); end
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步