鍍金池/ 問答/HTML/ 中間部分如何優(yōu)化

中間部分如何優(yōu)化

actionNodes,ranColors是數(shù)組

callFuncAction: function (node,color,returnAction){
        return cc.callFunc(function(){
            let newNode = node;
            newNode.ranColor = color;
            newNode.returnAction = returnAction;
            newNode.runAction(this.changeColorAction(node))
        },this)
    },
    
    let node = this.actionNodes[0];
    node.ranColor = this.ranColors[0];


    node.returnAction = this.callFuncAction(this.actionNodes[1],this.ranColors[1],this.callFuncAction(this.actionNodes[2],this.ranColors[2],this.callFuncAction(this.actionNodes[3],this.ranColors[3],null)));


    node.runAction(this.changeColorAction(node))
回答
編輯回答
笑浮塵

鉆牛角尖了,已解決

2018年1月30日 20:20