zoukankan      html  css  js  c++  java
  • 带冷却时间的按钮(一)

    // 技能CD
                var progressBox2 = cc.Sprite.createWithSpriteFrameName("ui_progress3.png");
                progressBox2.setAnchorPoint(AnchorPointBottom);
                var progress2_xPos = winSize.width - 20;
                var progress2_yPos = winSize.height/2;
                progressBox2.setPosition(progress2_xPos, progress2_yPos);
                this.addChild(progressBox2, g_GameZOder.ui);
                this.lbProgress2 = cc.Sprite.createWithSpriteFrameName("ui_progress4.png");
                this.lbProgress2.setAnchorPoint(AnchorPointBottom);
                this.lbProgress2.setPosition(progress2_xPos, progress2_yPos);
                this.addChild(this.lbProgress2, g_GameZOder.ui);
    if (this._cd < this._ship.skillCd) {
                    this._cd ++;
                    if (this._cd == this._ship.skillCd) {
                // 播放CD结束动画

    // this.skill_up.runAction(cc.TintBy.create(0.1,0,-255,-255).reverse());
    var animation = cc.AnimationCache.getInstance().getAnimation(this._ship.skillIcon);
    animation.setRestoreOriginalFrame(true);
    var animate = cc.Animate.create(animation);
    var animate2 = animate.reverse();
    this.skill_up.runAction(cc.Sequence.create(animate, animate2));

    
                    }
                }
                else {
                    this._cd = this._ship.skillCd;
                }
                this.lbProgress2.setScaleY(this._cd / this._ship.skillCd);
  • 相关阅读:
    EntityFramework系列:MySql的RowVersion
    EntityFramework系列:SQLite.CodeFirst自动生成数据库
    怎么回事呢?
    为蛇么不现实
    发布到个人主页
    作别
    budao 首页
    中午吃饱了
    作业写好了吗?
    分类
  • 原文地址:https://www.cnblogs.com/linn/p/3488067.html
Copyright © 2011-2022 走看看