creator 1.5.1 中 node.active = true 需要执行2次才有效

如题, 请问我该怎么处理?

有引擎组的大大回复以下吗?

描述清楚了,是什么效果变成有效,不然真不知道怎么回答你…

直接贴代码+描述

cc.Class({
extends: cc.Component,

properties: {
    control1:cc.Node, //hero控制界面
    control2:cc.Node, //主控

},

do_actionSeat:function(data){
if(this._heroSeat != null && data.currentActionSeat == this._heroSeat.seatindex){
this.node.getChildByName(“myControl”).getComponent(“handControl”).updateData();

        if(this.isAutoFold){
            cc.vv.net.send("fferp");
            this.isAutoFold = false;
            this.control1.active = false;
            this.control2.active = false;
            this.control1.active = false;
            this.control2.active = false;
            return;
        }
        if(this.isAutoCall){
            var callData = {
                num:this.curMaxBet,
            };
            cc.vv.net.send("seffd", callData);
            this.isAutoCall = false;
            this.control1.active = false;
            this.control2.active = false;
            this.control1.active = false;
            this.control2.active = false;
            return;
        }
        
        this.control1.active = false;
        this.control2.active = true;
        this.control1.active = false;
        this.control2.active = true;
    }else{
        this.control1.active = true;
        this.control2.active = false;
        this.control1.active = true;
        this.control2.active = false;
    }

}

}

这个 Component 里面的 .active = xxx 我都是执行了2次才有效。 1次无效。
其他 Component 的1次就有效。

你是不是挂了 2 个这个的组件?不可能就这个无效,其他的有效啊

vs中全局搜索,发现代码和.fire中只有一个这个组件。我到时候升级到1.6试一试。