• lua -- 字体闪烁


    -- 这里是实现控件的闪烁,不能将一个局部的动作变量,赋给两个控件来动作,只能一个控件对应一个动作
    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
  • 相关阅读:
    C语言基本语法——函数
    C语言基本语法——数组
    iOS面试总结(待完善)
    iOS开发——蓝牙开发
    iOS开发——性能分析
    ios开发——runtime
    Extjs6的常见问题及解决办法
    会员信息布局,自动放缩
    LINQ关于NULL的怪现象
    [代码整洁]自我感悟
  • 原文地址:https://www.cnblogs.com/newlist/p/3667143.html
Copyright © 2020-2023  润新知