creator 中设置tmpCard.opacity = 0后再设置tmpCard.opacity = 255没有效果

潇湘痴雨
Mon, 24 Dec 2018 03:40:15 +0000

var tmpaction = cc.sequence(
                cc.delayTime(preDuration + PLAYER_CARD_DURATION * i),
                cc.callFunc(function () {


                    if (cardBefore == undefined) {
                        tmpCard.setPosition(cc.v2(winSize.width / 2, tmpY));
                    } else {
                        tmpCard.setPosition(cc.v2(cardBefore.x + intervalX - PLAYER_CARD_DURATION * speed, tmpY));

                    }
                    tmpCard.opacity = 255;

                }),
                cc.delayTime(PLAYER_CARD_DURATION),
                cc.moveTo((PLAYER_CARD_DURATION * (cards.length - i)), cc.v2(posX + i * intervalX, tmpY)),
                cc.moveTo(0.2, cc.v2(winSize.width / 2, tmpY)).easing(cc.easeIn(2)));
            tmpCard.opacity = 0;
            tmpCard.active = true;

阅读整个主题